/removeFromServer: Remove from Server

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 removeFromServer operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
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=pjson

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 Publish Layers operation must be deleted before the data store can be unregistered.

Request parameters

ParameterDetails

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

Use dark colors for code blocksCopy
1
datastoreId=55d87f404a7e420bb969ccb70254bfec

serverId

(Required)

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

Example

Use dark colors for code blocksCopy
1
serverId=9sQswqEpB31ymiCD

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:

Use dark colors for code blocksCopy
1
{"success": true}

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

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
{
  "error": {
    "code": 400,
    "message": "Remove data store from server failed.",
    "details": [
      "Unable to find server with specified id."
    ]
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.