- URL:https://<datastores-url>/getServers
- Version Introduced:10.7.1
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
Parameter | Details |
---|---|
datastoreId | The itemId of the data store.
|
f | The response format. The default format is html. Value: html | json |
Example usage
Below is a sample URL for the GetServerForDataStore operation.
https://webadaptor.domain.com/webadaptor/sharing/rest/portals/<portal Id>/datastores/getServers
JSON request example
<self-url>/datastores/getServers?datastoreId=55d87f404a7e420bb969ccb70254bfec
Response
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" : []
}
}