- 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 get operation:
POST /<context>/sharing/rest/portals/0123456789ABCDEF/datastores/getServers HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
datastoreId=55d87f404a7e420bb969ccb70254bfec&f=pjsonDescription
The get operation returns a list of your servers that a given data store has been registered to. This operation returns the server, 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
| Parameter | Details |
|---|---|
| The Example |
| The response format. The default format is Value: |
JSON Response examples
If successful, get 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, get 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": []
}
}