Skip To Content

/getServers: Get Servers for Data Store

  • URL:https://<root>/portals/<portalID>/datastores/getServers
  • Version Introduced:10.7.1

Example usage

Below is a sample ArcGIS Enterprise post request for the getServers operation:


POST /webadaptor/sharing/rest/portals/0123456789ABCDEF/datastores/getServers HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

datastoreId=55d87f404a7e420bb969ccb70254bfec&f=pjson

Description

The getServers operation returns a list of your servers that a given data store has been registered to. This operation returns the serverId, the server name, both the server and admin URLs, and whether or not the server is hosted. If the response format (f) is set to JSON, information regarding the server's type, role, and function are also returned.

Request parameters

ParameterDetails
datastoreId

The itemId of the data store.

datastoreId=55d87f404a7e420bb969ccb70254bfec
f

The response format. The default format is html.

Value: html | json | pjson

JSON Response examples

If successful, getServers will return the data store's server information:


{
  "servers": [
    {
      "id": "Qv4fdttWoWwdt5Zo",
      "name": <server name>,
      "adminUrl": <admin URL>,
      "url": <server URL>,
      "isHosted": true,
      "serverType": "ArcGIS",
      "serverRole": "HOSTING_SERVER",
      "serverFunction": ""
    }
  ]
}

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


{
  "error": {
    "code": 400,
    "messageCode": "Get data store servers failed.",
    "message": " 'datastoreId' or 'datastore' must be specified.",
    "details": []
  }
}