Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Overview
Check the list of available endpoints and methods to create and modify users using the Provisioning API.
...
Endpoints and methods
...
Description
...
Status | ||||
---|---|---|---|---|
|
/v2/accounts/{accountName}/tokens
see below...
Get a list of all the tokens for the provided account.
...
Status | ||||
---|---|---|---|---|
|
/v2/accounts/{accountName}/tokens
/{tokenId}
see below...
Returns all the information of a single token, including the actual token.
...
Status | ||||
---|---|---|---|---|
|
/v2/accounts/{accountName}/tokens
see below...
Create a new token.
...
Status | ||||
---|---|---|---|---|
|
/v2/accounts/{accountName}/tokens/{tokenId}/enable
see below...
Enable a token.
...
Status | ||||
---|---|---|---|---|
|
/v2/accounts/{accountName}/tokens/{tokenId}/disable
see below...
Disable a token.
...
Status | ||||
---|---|---|---|---|
|
/v2/accounts/{accountName}/tokens/{tokenId}/rename
see below...
Change the name associated with a token.
...
Status | ||||
---|---|---|---|---|
|
/v2/accounts/{accountName}/tokens/{tokenId}
see below...
Delete a token.
Endpoints and methods
...
Lists all the tokens for the provided account. This endpoint returns the information about the tokens and their IDs, but NOT the tokens themselves for security.
...
title | Request |
---|
Path parameters
Add the following path parameters as part of the endpoint:
...
Parameter
...
Type
...
Description
...
accountName
required
...
string
...
The name of the account.
Find below a request example:
Code Block |
---|
https://api-us.devo.com/xxx/v2/accounts/sampleAccount/tokens |
...
title | Response |
---|
...
Code
...
Description
...
200
...
Successful response. List of tokens retrieved.
Code Block |
---|
[
{
"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": "autotest",
"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": "autotest",
"created": "2024-11-25T14:38:18.000+0000",
"updated": "2024-11-25T14:38:18.000+0000",
"expires_in_seconds": 86400
}
] |
...
4xx
...
Bad request.
Code Block |
---|
{
"error": {
"code": 4xx,
"message": "string"
}
} |
Table of Contents | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Overview
Check the list of available endpoints and methods to create and modify users using the Provisioning API.
Endpoints and methods | Description | ||||||
---|---|---|---|---|---|---|---|
/v2/accounts/{accountName}/tokens see below | Get a list of all the tokens for the provided account. | ||||||
/v2/accounts/{accountName}/tokens /{tokenId} see below | Returns all the information of a single token, including the actual token. | ||||||
/v2/accounts/{accountName}/tokens see below | Create a new token. | ||||||
/v2/accounts/{accountName}/tokens/{tokenId}/enable see below | Enable a token. | ||||||
/v2/accounts/{accountName}/tokens/{tokenId}/disable see below | Disable a token. | ||||||
/v2/accounts/{accountName}/tokens/{tokenId}/rename see below | Change the name associated with a token. | ||||||
/v2/accounts/{accountName}/tokens/{tokenId} see below | Delete a token. |
Endpoints and methods
Anchor | ||||
---|---|---|---|---|
|
/v2/accounts/{accountName}/tokens
...
Lists all the tokens for the provided account. This endpoint returns the information about the tokens and their IDs, but NOT the tokens themselves for security.
Expand | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
Path parametersAdd the following path parameters as part of the endpoint:
| The ID of the token
Find below a request example:
|
Expand | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||
4xx Bad request. Code Block |
|
...
Add an internal user to a multitenant domain.
Every user in a domain needs to have at least one role assigned to them, either one of the default roles in the application or a custom role. While creating users in a domain, keep in mind the following restrictions:
Internal users cannot be used immediately after creation - they must first be activated through a link sent to the email address provided. The activation process also requires the user to create a password.
The first user added to a new domain must be internal and must be the domain owner. Owners cannot be deleted, and a domain can only have one owner.
Note |
---|
You’ll need the multitenant API keys to create the first user in the domain, and its role must be |
To assign a user (new or existing) as a domain owner, use the role
OWNER
when creating the user. This will create the user with the roleADMIN
but withOWNER
privileges. TheADMIN
role is exclusive and cannot be combined with other roles.
Note |
---|
Notice that even though the role |
This method can be also used to add an existing user to a different domain. In this case, the user will keep their original user name and phone number, ignoring any new value provided for them. The field
externalId
is ignored too since it only has meaning for external users (who might not have a password in the platform).
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
Parameter | Type | Description | ||||||||
|
| Set this to
| ||||||||
Parameter | Type | Description | ||||||||
|
| Domain name. Must match the expression "^[A-Za-z]A-Za-z0-9_-?$". | ||||||||
|
| Name of the new user. Must match the expression "^(([a-zA-Z0-9À-ÿ])+([ _'.@-]))([a-zA-Z0-9À-ÿ])$". This field will be ignored if you are adding an already existing user to a different domain, and the current value will be kept. | ||||||||
|
| Enter the email address of the new user. | ||||||||
|
| Role of the new user. Basic roles in Devo are:
Custom roles must match the expression "^(([a-zA-Z0-9])+([ _-]))([a-zA-Z0-9])$". Check more info about roles at the top of this endpoint section. | ||||||||
|
| Phone number of the new user. Must match the expression "^+(?:[0-9] ?){6,14}[0-9]$". This field will be ignored if you are adding an already existing user to a different domain, and the current value will be kept. |
Code Block |
---|
https://api-us.devo.com/probio/user/internal?skipValidation=false |
And this is an example of a request body, including the required JSON object. In this example, we are adding the first user (owner) of a domain:
Code Block |
---|
{
"domain": "domainName@resellerName",
"userName": "Frank",
"email": "user@devo.com",
"role": "OWNER"
} |
title | Response |
---|
Code
Description
200
Successful response. User added to the given domain.
| |||
4xx | Bad request.
|
...
Anchor | ||||
---|---|---|---|---|
|
/v2/accounts/{accountName}/tokens/{tokenId}
Returns the full information on a single token, identified by its ID. The response to this request includes the actual token.
Expand | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
Path parametersAdd the following path parameters as part of the endpoint:
Find below a request example:
|
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
...
Anchor | ||||
---|---|---|---|---|
|
/v2/accounts/{accountName}/tokens
Creates a new token.
Payload:
Code Block |
---|
{
"name": "string",
"owner": "email",
"user": "email",
"audience": "string",
"scopes": "string",
"expiresInSeconds": 86400
} |
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.
Expand | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Path parametersAdd the following path parameters as part of the endpoint:
Find below a request example:
|
Expand | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
Info |
---|
Creating a token returns the |
...
Anchor | ||||
---|---|---|---|---|
|
/user/email/{userEmail}/domain/{domainName}/role
Set the roles of a user in a given domain.
Expand | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||
Path parametersAdd the following path parameters as part of the endpoint:
Query string parametersQuery string parameters are added after the path parameters, preceded by a question mark (
Request bodyThe request JSON body must include the following key-value pairs:
Find below a request example:
And this is an example of a request body, including the required JSON object:
|
Expand | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
|
...
Anchor | ||||
---|---|---|---|---|
|
/user/email/{userEmail}/domain/{domainName}/role
Removes the indicated roles from the user in the specified domain.
Expand | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||
Path parametersAdd the following path parameters as part of the endpoint:
Request bodyThe request JSON body must include the following key-value pairs:
Find below a request example:
And this is an example of a request body, including the required JSON object:
|
...