- URL:
- https://<root>/generateToken
- Methods:
POST- Required Capability:
- Administrator
- Version Introduced:
- 12.2
Description
The generate operation generates an ArcGIS token that can be used by clients when working with the ArcGIS Data Pipelines Server Administrator API.
Request parameters
| Parameter | Details |
|---|---|
| The case-sensitive username of the user who wants to get a token. Example |
| The password of the user who wants to get a token. Example |
| The client identification type for which the token is to be generated. Users can specify whether the token will be generated for a client application's base URL, a user-specified IP address, or the IP address that is making the request. Values: |
| The base URL of the web app that will invoke the request to access a secured resource. This parameter must be specified if the value of the Example |
| The IP address of the machine that will invoke the request to access a secured resource. This parameter must be specified if the value of the Example |
| The token expiration time in minutes. The default is 60 minutes (one hour). Applications are responsible for renewing expired tokens; expired tokens will be rejected by the server on subsequent requests that use the token. Example |
| The response format. The default response format is Values: |
Example usage
The following is a sample POST request for the generate operation:
POST /<context>/admin/generateToken HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []
username=user1&password=testpassword&client=referer&referer=https://organization.example.com&expiration=90&f=jsonJSON Response syntax
{
"token":"<token>",
"expires": "<date>"
}JSON Response example
{
"token": "sakjfh97325437hskfsdfd_sdkjfsjf1283763339564921734sdfbdsj",
"expires": "13472658353687"
}