- URL:
- https://<adminRoot>/<serviceName>/FeatureServer/<layerId>/truncate
- Methods:
- POST
- 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 | 
|---|---|
| 
 | Supports options for whether attachments will be deleted from the attachment table along with the features in the layer. Values:  | 
| 
 | Support options for asynchronous processing. The default value is  Values:  | 
| 
 | The response format. The default response format is  Values:  | 
Example usage
The following is a sample POST request for the truncate  operation:
POST /<context>/rest/admin/services/example/FeatureServer/0/truncate HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
attachmentOnly=true&async=true&f=pjsonJSON Response example
{
  "success": true
}