- URL:https://[root]/portals/[portalID]/datastores/removeFromServer(POST only)
- Version Introduced:10.7.1
Example usage
Below is a sample ArcGIS Enterprise POST request for the removeFromServer operation:
POST /webadaptor/sharing/rest/portals/0123456789ABCDEF/datastores/removeFromServer HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
datastoreId=55d87f404a7e420bb969ccb70254bfec&serverId=9sQswqEpB31ymiCD&f=pjsonDescription
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
| Parameter | Details | 
|---|---|
| datastoreId (Required) | The itemId of the data store you want to remove from the given server. Note 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. Example  | 
| serverId (Required) | The serverId of the server you want to remove the data store from. Example  | 
| f | The response format. The default format is html. Values: html | json | pjson | 
JSON Response examples
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."
    ]
  }
}