/addToServer: Add To Server

URL:
https://[root]/portals/[portalID]/datastores/addToServer
Methods:
POST
Version Introduced:
10.7.1

Example usage

The following is a sample ArcGIS Enterprise POST request for the addToServer operation:

1
2
3
4
5
6
POST /webadaptor/sharing/rest/portals/0123456789ABCDEF/datastores/addToServer HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

datastoreId=55d87f404a7e420bb969ccb70254bfec&serverId=9sQswqEpB31ymiCD&bindToServerDatastore=false&f=pjson

Description

The addToServer operation registers a data store to ArcGIS Server. Before registering a data store, it is recommended that you validate the data store with the given server.

If your data store was registered with other federated servers using the same name, and you want the data store item in the portal to be recognized by any of your other federated servers, you can use this operation to bind the data store item to an additional federated server or servers.

Request parameters

ParameterDetails

datastoreId

(Required)

The itemId of the data store that will be registered with the server. A data store can be registered on multiple servers.

Example

1
datastoreId=55d87f404a7e420bb969ccb70254bfec

serverId

(Required)

The server with which the data store will be registered.

Example

1
serverId=9sQswqEpB31ymiCD

bindToServerDatastore

Specifies whether to bind the data store item to the federated server. For more information about binding a data store to additional federated servers, see Create a data store item for an existing registered data store. The default value is false.

Values: true | false

f

The response format. The default format is html.

Values: html | json | pjson

JSON Response examples

If the operation is successful, addToServer will return the following success message:

1
{"success": true}

If the operation fails, addToServer will return an error similar to the following message:

1
2
3
4
5
6
7
8
9
{
  "error": {
    "code": 400,
    "message": "Server registration error",
    "details": [
      "Add data store to server failed."
    ]
  }
}

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