Description
Deletes features in a table by performing a query on a table using an MI SQL Delete command string. For more information about MapInfo SQL functions, see MapInfo SQL Language Reference section.
ACL Authorization Flow
To delete features in a named table by performing a query on a named table using an MI SQL delete command string, the user (or the role they belong to) needs both EXECUTE and DELETE permission on the Named table.
HTTP POST URL Format
The following format is used for HTTP POST requests:
HTTP POST: /FeatureService/tables/features.rep?
POST Data: [delete=MI SQL query]
POST BODY: Content-Type:application/json {bound parameters}Parameters
The {bound parameters} is a POST json body (Content-Type: application/json) for the MI SQL delete query containing one or multiple parameters to be included. Null values are supported; however, a type is still required.
For information on the parameter types listed below, see Request URL Data Types.
| Parameter | Type | Required | Description |
|---|---|---|---|
| rep | String | yes | The representation to be returned. Supported representation is json. |
| delete=MI SQL query | String | yes | The delete query to perform, in MI SQL format. |
Returns
Returns the number of successfully deleted features in a named table in the repository.
Examples
Deletes features from MyTable using a bound parameter:
http://hostname:port/rest/Spatial/FeatureService/tables/features.json?
delete=DELETE FROM "/Samples/NamedTables/MyTable" WHERE Column1=@stringParam
{
"parameters" : [
{
"name" : "stringParam",
"value" : "stringVal"
}
]
}