/getServers: Get Servers for Data Store

URL:
https://[root]/portals/<portalID>/datastores/getServers
Methods:
GET
Version Introduced:
10.7.1

Example usage

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

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

Example

Use dark colors for code blocksCopy
1
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:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "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:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "error": {
    "code": 400,
    "messageCode": "Get data store servers failed.",
    "message": " 'datastoreId' or 'datastore' must be specified.",
    "details": []
  }
}

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