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:

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

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.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close