-
Notifications
You must be signed in to change notification settings - Fork 2
3.4) Delete
Guido Barbaglia edited this page May 27, 2015
·
3 revisions
The service can be consumed through a DELETE call to WDS and it is possible to delete multiple rows/documents at once.
This parameter is used to specify the name of the collection, for MongoDB and OrientDB databases, or the name of the table, for SQL databases. New resources will be created in the specified collection/table.
The payload is the same for every DBMS and it consists of an object containing the delete query.
{
"query": "DELETE FROM my_table WHERE AreaName = 'Italy'"
}$.ajax({
type: 'DELETE',
url: 'rest/crud',
data: {
payload: {
"query": "DELETE FROM my_table WHERE AreaName = 'Italy'"
},
datasource: "my_datasource",
collection: "my_collection",
outputType: "object"
},
success: function (response) {
/* Do something with the output... */
},
error: function (a) {
alert(a.responseText);
}
});