Skip To Content
ArcGIS Developers

Delete Layers


Before a data store can be unregistered from a server, all of its bulk-published layers must be deleted, as the removeFromServer operation cannot be completed if there are outstanding bulk-published layers. The deleteLayers operation deletes all layers published from the data store.

Request parameters


The itemId of a bulk-published data store.



The response format. The default format is html.

Value: html | json

Example usage

Below is a sample URL for the deleteLayers operation.<portal Id>/datastores/allDatasets/deleteLayers


This operation is an asynchronous operation. If successful, deleteLayers will return the following information:

  "success": true,
  "datastoreId": "d50d572d94054706b42cdb74c0cf6db5",
  "serverId": "xpPVgRdFvnEIbZl7",
  "jobType": "deleteAllBPLayers",
  "jobId": "jf8627ef9-d07d-48f6-9dcb-967f6f8b480a"

The status operation can be used to check the current state of the operation by making a request of the following form using the datastoreId:<datastoreId>/status

If successful, deleteLayers will return a status message (partial, completed, or failed) with the itemId and jobInfo of each deleted layer:

  "status": "completed",
  "statusMessage": "completed",
  "itemId": "d50d572d94054706b42cdb74c0cf6db5",
    "serverId": "xpPVgRdFvnEIbZl7",
    "jobId": "jf8627ef9-d07d-48f6-9dcb-967f6f8b480a",
    "jobType": "deleteAllBPLayers"