Skip to content
URL:
https://<root>/security/tokens/update
Methods:
POST
Version Introduced:
10.2.1

Access requirements

Required privileges

The Portal Administrator API requires privilege-based access. An administrator must be assigned a specific user privilege, or role, to access any given endpoint. Listed below are the user privileges or roles an administrator can be assigned that provides access to this endpoint. If multiple privileges are listed, only one needs to be assigned to gain access.


Tokens

This API requires token-based authentication. A token is automatically generated for administrators who sign in to the Portal Administrator API directory's HTML interface. Tokens generated in this way are stored for the entirety of the session.

Those accessing the API directory outside of the HTML interface will need to acquire a session token from the generateToken operation in the Portal Directory API. For security reasons, all POST requests made to the Portal Administrator API must include a token in the request body.


Learn how to generate a token

Description

The update operation updates the shared key that is used to generate tokens and encrypt specific elements of your ArcGIS Enterprise portal licensing information. Starting at ArcGIS Enterprise 11.4, this operation generates a new base64 encoded key rather than requiring a new shared key be manually provided by administrators. For organizations using a version of Enterprise at 11.3 or earlier, a manual key will still need to be provided. Keys must either be a 32-byte string or 44 characters if the key is base64 encoded. Key length is verified prior to any changes taking place.

Performing the request will update the token configuration information with the new key (either generated by the system or provided by an administrator) and any previously issued tokens and encryption will be invalidated. Once the operation is complete, ArcGIS Enterprise portal will restart and remain inaccessible for some time.

Request parameters

ParameterDetails

tokenConfig

The JSON object representing the token configuration. It must contain an attribute named sharedKey. Starting at ArcGIS Enterprise 11.4, this key will be generated. For versions 11.3 or earlier, administrators must provide a new key. The key needs to be either a 32-byte string or 44 characters if the key is base64 encoded.

Example
Use dark colors for code blocksCopy
1
tokenConfig={"sharedKey": "gbw6+cxasO+Rq0wHUWtnS040mLW1mO4Sh+vmbW7F+cs="}

f

The response format. The default response format is html.

Values: html | json | pjson

Example usage

The following is a sample POST request for the update operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
POST /<context>/portaladmin/security/tokens/update HTTP/1.1
Host: organization.example.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

tokenConfig={
  "sharedKey": "gbw6+cxasO+Rq0wHUWtnS040mLW1mO4Sh+vmbW7F+cs="
}&f=pjson

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
{
  "status": "success",
  "recheckAfterSeconds": 10
}

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