Document toolboxDocument toolbox

[DRAFT] Basic Operations

Overview

Check the list of available endpoints and methods to create and modify users using the Provisioning API.

Endpoints and methods

Description

Endpoints and methods

Description

GET /v2/accounts/{accountName}/tokens see below

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

GET /v2/accounts/{accountName}/tokens/{tokenId} see below

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

POST /v2/accounts/{accountName}/tokens see below

Creates a new token.

PUT /v2/accounts/{accountName}/tokens/{tokenId}/enable see below

Enables a token.

PUT /v2/accounts/{accountName}/tokens/{tokenId}/disable see below

Disables a token.

PUT /v2/accounts/{accountName}/tokens/{tokenId}/rename see below

Changes the name associated with a token.

DELETE /v2/accounts/{accountName}/tokens/{tokenId} see below

Deletes a token.

Endpoints and methods

GET /v2/accounts/{accountName}/tokens

Lists all the tokens for the provided account. This endpoint returns information about the tokens and their IDs but does not include the actual 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/v2/accounts/sampleAccount/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": "apiv2-admin aggregations apiv2", "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": "apiv2-admin aggregations apiv2", "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 /v2/accounts/{accountName}/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 /v2/accounts/{accountName}/tokens

Creates a new token.

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:

  • name is optional, and defaults to 'Unnamed' when not present.

  • user is optional and only required when a user is creating a token on behalf of another user. The credentials are resolved for the value of this field (which defaults to the owner when not present).

  • audience is required (samples: apiv2, apiv2-admin, alerts, aggregations, http).

  • scopes is optional and defaults to 'default' when not present.

  • expiresInSeconds is optional and defaults to 86400 when not present. Use the value -1 to create a permanent token.

Find below a request example:


PUT /v2/accounts/{accountName}/tokens/{tokenId}/enable

Enable token by ID.


PUT /v2/accounts/{accountName}/tokens/{tokenId}/disable

Disable token by ID.


PUT /v2/accounts/{accountName}/tokens/{tokenId}/rename

This endpoint updates the name associated with a token, identified by its ID.


DELETE /v2/accounts/{accountName}/tokens/{tokenId}

Deletes a token from an account.

Only to be used when the token is to be removed from the service. There is no coming back from this, and once a token is deleted then it's gone for good.