- URL:
 - https://[root]/portals/[portalID]/datastores/removeFromServer
 - Methods:
 POST- Version Introduced:
 - 10.7.1
 
Example usage
The following is a sample ArcGIS Enterprise POST request for the remove operation:
POST /<context>/sharing/rest/portals/0123456789ABCDEF/datastores/removeFromServer HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
datastoreId=55d87f404a7e420bb969ccb70254bfec&serverId=9sQswqEpB31ymiCD&f=pjsonDescription
The remove 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 Publish Layers operation must be deleted before the data store can be unregistered.
Request parameters
| Parameter | Details | 
|---|---|
 (Required)  | The  Example  | 
 (Required)  | The  Example  | 
  | The response format. The default format is  Values:   | 
JSON Response examples
If successful, remove will return the following success message:
{"success": true}If the operation fails, remove 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."
    ]
  }
}