FRAMES | NO FRAMES Description | Parameters | Response
Generate Admin Token (Operation)
URL http://<admin-url>/generateToken

Description

The generate admin token operation. This operation generates a security token that can be used by clients when working with the REST API Admin.

The token generated by this operation needs to be specified using the token parameter when accessing the REST Admin. Example:

http://<admin-url>/cache/clear?token=<token>

Parameters

Parameter Details
f Description: The response format. The default response format is html.

Values: html | json
username Description: The admin username. This user must be a member of the ArcGIS Server administrators group.
password Description: The admin password
client Description: The client IP or HTTP Referer for which the token is to be generated.
  • If the value is specified as ip, the ip parameter must be specified.
  • If the value is specified as requestip (request IP), the token is generated for the IP from where the request originated.
  • If the value is specified as referer, the referer parameter must be specified.
The default value is referer

Values: referer | ip | requestip
referer Description: The base url of the webapp that will invoke the REST API Admin. This parameter must be specified if the value of the client parameter is referer

Example: referer=http://myserver/mywebapp
ip Description: The ip address of the machine that will invoke the REST API Admin. This parameter must be specified if the value of the client parameter is ip

Example: ip=10.14.102.85
expiration Description: The token expiration time in minutes. The default is 60 minutes. Tokens can be generated upto a maximum expiry of 1 year (525600 minutes).

Example: expiration=43200 (1 month)

JSON Response Syntax

{
  "token": "<token>",
  "expires": <expires> //the time (in milliseconds from epoch) when this token will expire
}

JSON Response Example

{
  "token": "G6943LMReKj_kqdAVrAiPbpRloAfE1fqp0eVAJ-IChQcV-kv3gW-gBAzWztBEdFY",
  "expires": 1255466350163
}