Skip To Content ArcGIS for Developers Sign In Dashboard

Remove from Server

  • URL:https://<datastores-url>/removeFromServer(POST only)
  • Version Introduced:10.7.1

Description

The removeFromServer operation unregisters a specified data store from your ArcGIS Server. A data store cannot be removed, however, if there are outstanding bulk-publishing layers on the specified server. All layers published through the publishLayers operation must be deleted before the data store can be unregistered.

Request parameters

ParameterDetails
datastoreId

The itemId of the data store you want to remove from the given server. Remember that a single data store may be registered across multiple servers. Use the getServers operation to determine if the data store is registered across multiple servers.

datastoreId=55d87f404a7e420bb969ccb70254bfec

serverId

The serverId of the server you want to remove the data store from.

serverId=9sQswqEpB31ymiCD

f

The response format. The default format is html.

Value: html | json

Example usage

Below is a sample URL for the removeFromServer operation.

https://webadaptor.domain.com/webadaptor/sharing/rest/portals/<portal Id>/datastores/removeFromServer

Request example

POST <self-url>/datastores/removeFromServer?datastoreId=55d87f404a7e420bb969ccb70254bfec&serverId=9sQswqEpB31ymiCD

Response

If successful, removeFromServer will return the following success message:

{"success": true}

If the operation fails, removeFromServer will return an error similar to the message below:

{
  "error" :
  {
    "code" : 400,
    "message" : "Remove data store from server failed.",
    "details" : [
      "Unable to find server with specified id."
    ]
  }
}