FRAMES | NO FRAMES | Description | Parameters | Response |
URL | http://<admin-url>/generateToken |
---|
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>
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.
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)
|
{
"token": "<token>",
"expires": <expires> //the time (in milliseconds from epoch) when this token will expire
}
{ "token": "G6943LMReKj_kqdAVrAiPbpRloAfE1fqp0eVAJ-IChQcV-kv3gW-gBAzWztBEdFY", "expires": 1255466350163 }