Operation Response

Description

Most operations in the ArcGIS Server Administrator API return a typical response structure indicating if the operation failed or succeeded. If the API Reference does not explicitly list the response format, then it is designed to return the standard response structure described here.

A successful operation is reported with the status parameter indicating a success . Sometimes, the return value of the object can be embedded inside this operation response. For example, when you upload an item, the upload API returns the ID of the uploaded item in the operation response. A failed operation in addition to the status parameter indicating failed , often returns messages and code parameters that give more information about the reason for the failure.

Request parameters

ParameterDetails

status

Indicates if the operation is successful or failed.

Values: success | failed

messages

An array of messages indicating the reason for failure.

code

Indicates if the operation is successful or failed.

Values: success | failed

JSON Response example

A successful operation response:

Use dark colors for code blocksCopy
1
2
3
{
	 "status": "success"
}

A failed operation response:

Use dark colors for code blocksCopy
1
2
3
4
5
{
  	"status": "error",
  	"messages": ["Unauthorized access.Token not found. You can generate a token using the 'generateToken' operation."],
  	"code": 499
}

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