/
Basic operations in the Credentials API

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

Endpoints and methods

Description

GET /ws/accounts/{accountName}/credentials/tokens see below

Returns a list of all the tokens for the provided account.

GET /ws/accounts/{accountName}/credentials/tokens/{tokenId} see below

Returns all the information of a single token, including the token itself.

POST /ws/accounts/{accountName}/credentials/tokens see below

Creates a new token.

PUT /ws/accounts/{accountName}/credentials/tokens/{tokenId}/enable see below

Enables a token.

PUT /ws/accounts/{accountName}/credentials/tokens/{tokenId}/disable see below

Disables a token.

PUT /ws/accounts/{accountName}/credentials/tokens/{tokenId}/rename see below

Changes the name associated with a token.

DELETE /ws/accounts/{accountName}/credentials/tokens/{tokenId} see below

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.

Path parameters

Add the following path parameters as part of the endpoint:

Parameter

Type

Description

Parameter

Type

Description

accountName required

string

The name of the account.

Find below a request example:

https://api-us.devo.com/xxx/ws/accounts/sampleAccount/credentials/tokens

Code

Description

Code

Description

200

Successful response. List of tokens retrieved.

[ { "name": "a", "id": 1, "scope": "table://*.** level://admin", "owner": "web-testing+auto-admin@devo.com", "user": "web-testing+auto-admin@devo.com", "audience": "apiws-admin aggregations apiws", "token_type": "Bearer", "active": true, "expiration": "2024-11-26T14:38:18.000+0000", "account": "sampleAccount", "created": "2024-11-25T14:38:18.000+0000", "updated": "2024-11-25T14:38:18.000+0000", "expires_in_seconds": 86400 }, { "name": "b", "id": 2, "scope": "table://*.** level://admin", "owner": "web-testing+auto-admin@devo.com", "user": "web-testing+auto-admin@devo.com", "audience": "apiws-admin aggregations apiws", "token_type": "Bearer", "active": true, "expiration": "2024-11-26T14:38:18.000+0000", "account": "sampleAccount", "created": "2024-11-25T14:38:18.000+0000", "updated": "2024-11-25T14:38:18.000+0000", "expires_in_seconds": 86400 } ]

4xx

Bad request.

{ "error": { "code": 4xx, "message": "string" } }

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.

Path parameters

Add the following path parameters as part of the endpoint:

Parameter

Type

Description

Parameter

Type

Description

accountName required

string

The name of the account.

tokenId required

string

The ID of the token.

Find below a request example:

Code

Description

Code

Description

200

Successful response. Token retrieved.

4xx

Bad request.


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.

Path parameters

Add the following path parameters as part of the endpoint:

Parameter

Type

Description

Parameter

Type

Description

accountName required

string

The name of the account.

Payload:

Find below a request example:


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.

Related content

Authorizing Provisioning API Requests
Authorizing Provisioning API Requests
More like this
Azure Event Hub collector
Azure Event Hub collector
Read with this
Authentication tokens
Authentication tokens
More like this
User operations
User operations
More like this