- URL:https://<featurelayer-url>/truncate(POST only)
- Version Introduced:11.2
Description
The truncate operation deletes all features in a feature service layer. The result of this operation is a response indicating the success or failure (with an error code) of the operation and, if successful and performed asynchronously, a status URL that can be used to occasionally poll the progress.
Request parameters
Parameter | Details |
---|---|
attachmentOnly | Supports options for whether attachments will be deleted from the attachment table along with the features in the layer. Values: true | false |
async | Support options for asynchronous processing. The default value is false. Values: true | false |
f | The response format. The default response format is html. Values: html | json | pjson |
Example usage
The following is a sample POST request for the truncate operation:
POST /webadaptor/rest/admin/services/example/FeatureServer/0/truncate HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
attachmentOnly=true&async=true&f=pjson
JSON Response example
{
"success": true
}