/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:

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

1
datastoreId=55d87f404a7e420bb969ccb70254bfec

serverId

(Required)

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

Example

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:

1
{"success": true}

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

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.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close