FRAMES | NO FRAMES Description | Parameters | Request | Response | Example
URL:http://server:port/arcgis/admin/generateToken
HTTP Method:POST
Parent Resource:Site
Required Privileges:Administrator

Description

Generates a token.

The generated security token can be used by clients when working with the Administrator API.

Parameters

Parameter Description
username The name of an administrative account for the site.
password The credentials of the administrative account.
client The client IP or HTTP Referrer to which the generated token will be bound.
Values: referrer | ip | requestip
  • If the value is referrer, the referrer parameter must be specified.
  • If the value is ip, the ip parameter must be specified.
  • If the value is requestip, the IP address from where the request originated is used.
referrer The base URL of the web application that will invoke the Administrator API. This parameter must be specified if the value of client parameter is referrer.
Example: referrer=http://myserver/mywebapp
ip The IP address of the machine that will invoke the Administrator API. This parameter must be specified if the value of the client parameter is ip.
Example: ##.##.###.###
expiration The time in minutes for which the token must be valid.
f The response format. The default response format is html.
Values: html | json

Request Format

			
	http://server:port/arcgis/admin/generateToken
	username=admin
	password=secret
	client=referrer
	referrer=http://myserver/mywebapp
	expiration=100
			

Response Format

{
	"token":"<token>",
	"expires": "<date>";
}
			

Example

	
{
	"token": "sakjfh97325437hskfsdfd_sdkjfsjf1283763339564921734sdfbdsj",
	"expires": "13472658353687"
}