You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 4
Next »
Overview
Check the list of available endpoints and methods to create and modify users using the Provisioning API.
Endpoints and methods | Description |
---|
GET /v2/accounts/{accountName}/tokens see below | Get 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 | Create a new token. |
PUT /v2/accounts/{accountName}/tokens/{tokenId}/enable see below | Enable a token. |
PUT /v2/accounts/{accountName}/tokens/{tokenId}/disable see below | Disable a token. |
PUT /v2/accounts/{accountName}/tokens/{tokenId}/rename see below | Change the name associated with a token. |
DELETE /v2/accounts/{accountName}/tokens/{tokenId} see below | Delete a token. |
Endpoints and methods
GET /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.
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:
https://api-us.devo.com/xxx/v2/accounts/sampleAccount/tokens
Response
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 the full information on a single token, identified by its ID. The response to this request includes the actual token.
Request
Path parameters
Add the following path parameters as part of the endpoint:
Parameter | Type | Description |
---|
accountName required
| string
| The name of the account. |
tokenId required
| string
| The ID of the token. |
Find below a request example:
https://api-us.devo.com/xxx/v2/accounts/sampleAccount/tokens/3
Response
Code | Description |
---|
200 | Successful response. Token retrieved.
{
"name": "test",
"id": 3,
"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",
"token": "31089320378051f1a2ee17c14028f056",
"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"
}
}
|
POST /v2/accounts/{accountName}/tokens
Creates a new token.
Payload:
{
"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.
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:
https://api-us.devo.com/xxx/v2/accounts/sampleAccount/tokens
Response
Code | Description |
---|
200 | Successful response. Token created. |
4xx | Bad request.
{
"error": {
"code": 4xx,
"message": "string"
}
}
|
PUT /user/email/{userEmail}/domain/{domainName}/role
Set the roles of a user in a given domain.
Request
Path parameters
Add the following path parameters as part of the endpoint:
Parameter | Type | Description |
---|
userEmail required
| string
| Enter the email of the required user. |
domainName required
| string
| Enter the name of the required domain. You must enter the full domain name using the format {domainName}@{resellerName} |
Query string parameters
Query string parameters are added after the path parameters, preceded by a question mark (?
) and separated by an ampersand (&
)
Parameter | Type | Description |
---|
keepExisting
| boolean
| Set this to true to keep the current roles of the user, plus the new ones added through this request. The default value is false . |
Request body
The request JSON body must include the following key-value pairs:
Parameter | Type | Description |
---|
roles required
| object
| Enter the list of role names separated by commas. Basic roles in Devo are: Custom roles must match the expression "^(([a-zA-Z0-9])+([ _-]))([a-zA-Z0-9])$". |
Find below a request example:
https://api-us.devo.com/probio/user/email/user@devo.com/domain/domainName@resellerName/role?keepExisting=true
And this is an example of a request body, including the required JSON object:
[
"role1", "role2", "role3"
]
Response
Code | Description |
---|
200 | Successful response. Roles updated. |
4xx | Bad request.
{
"error": {
"code": 4xx,
"message": "string"
}
}
|
DELETE /user/email/{userEmail}/domain/{domainName}/role
Removes the indicated roles from the user in the specified domain.
Request
Path parameters
Add the following path parameters as part of the endpoint:
Parameter | Type | Description |
---|
userEmail required
| string
| Enter the email of the required user. |
domainName required
| string
| Enter the name of the required domain. You must enter the full domain name using the format {domainName}@{resellerName} |
Request body
The request JSON body must include the following key-value pairs:
Parameter | Type | Description |
---|
roles required
| object
| List of role names to be deleted, separated by commas. Basic roles in Devo are: Custom roles must match the expression "^(([a-zA-Z0-9])+([ _-]))([a-zA-Z0-9])$". |
Find below a request example:
https://api-us.devo.com/probio/user/email/user@devo.com/domain/domainName@resellerName/role
And this is an example of a request body, including the required JSON object:
[
"role1", "role2", "role3"
]
Response
Code | Description |
---|
200 | Successful response. Roles removed from user. |
4xx | Bad request.
{
"error": {
"code": 4xx,
"message": "string"
}
}
|