Skip To Content ArcGIS for Developers Sign In Dashboard

Add To Server

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.

At 10.7.1, 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.

Note:

You can only bind the data store item to other federated servers if the data store is already registered with the other federated servers, the registered data store has the same name on all the federated servers, and the data store accesses the same data source location. If the data store was registered with the federated servers using a different name, you must create separate data store items for them.

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.

datastoreId=55d87f404a7e420bb969ccb70254bfec

serverId

(Required)

The server with which the data store will be registered.

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.

Value: True | False

f

The response format. The default format is html.

Value: html | json

Example usage

The following is a sample URL for the addToServer operation:

https://webadaptor.domain.com/webadaptor/sharing/rest/portals/<portal Id>/datastores/addToServer

Request example

POST <self-url>/datastores/addToServer?datastoreId=55d87f404a7e420bb969ccb70254bfec&serverId=9sQswqEpB31ymiCD

Response

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

{"success": true}

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

{
  "error" :
  {
    "code" : 400,
    "message" : "Server registration error",
    "details" : [
      "Add data store to server failed."
    ]
  }
}