Basic operations in the Credentials API
To work with the Credentials API, users must have a role with the “API Credentials“ permission.
Also, they need to create a “Credentials API” token to authenticate requests to the API.
Overview
Check the list of available endpoints and methods to create and modify tokens using the Credentials API.
Endpoints and methods | Description |
---|---|
GET | Returns a list of all the tokens for the provided account. |
GET | Returns all the information of a single token, including the token itself. |
POST | Creates a new token. |
PUT | Enables a token. |
PUT | Disables a token. |
PUT | Changes the name associated with a token. |
DELETE | Deletes a token. |
The API currently only supports accounts of type 'domain'. So {accountName}
refers to {domainName}
.
Endpoints and methods
GET /ws/accounts/{accountName}/credentials/tokens
Lists all the tokens for the provided account. This endpoint returns information about the tokens and their IDs but does not include the token values for security reasons.
GET /ws/accounts/{accountName}/credentials/tokens/{tokenId}
Returns full details of a single token identified by its ID. The response to this request includes the actual token value.
POST /ws/accounts/{accountName}/credentials/tokens
Creates a new token.
The token's audience and scopes will be checked against the authorized user's available policies before it is created. This means a user without the correct policy cannot create a token with audiences that require that policy.
Some APIs may perform additional authentication checks based on the authorized token user for fine-grained access control.
PUT /ws/accounts/{accountName}/credentials/tokens/{tokenId}/enable
Enable token by ID.
PUT /ws/accounts/{accountName}/credentials/tokens/{tokenId}/disable
Disable token by ID.
PUT /ws/accounts/{accountName}/credentials/tokens/{tokenId}/rename
This endpoint updates the name associated with a token, identified by its ID.
DELETE /ws/accounts/{accountName}/credentials/tokens/{tokenId}
Deletes a token from an account.