Truncate

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

ParameterDetails

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:

Use dark colors for code blocksCopy
1
2
3
4
5
6
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

Use dark colors for code blocksCopy
1
2
3
{
  "success": true
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.