Example: a REST Service for deleting data (DELETE)

Previous Next

DELETE  FROM tour
WHERE   destination = :destination
AND     tour_type = :tour_type

In this example, you drop a tour from the catalogue of existing tours that is in the database.

This example shows how you can quickly generate a REST service from a SQL statement.

In this particular example, matrix parameters are used, but you have a number of other options when designing input parameters.

collapseDefining SQL
collapseGenerating a REST method based on SQL
collapsePublishing the solution
collapseTesting the implementation

 

 

Another popular design of this type of REST call is to pass back the result data in a response message. For this design, go to help topic " Example: a REST Service for returning manipulated data ".

 

See also

Generating a REST service from SQL

Example: a REST service for retrieving data (SELECT)

Example: a REST Service for adding new data (INSERT)

Example: a REST Service for manipulating data (UPDATE)

Example: a REST Service for returning manipulated data