You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
Overview
Check the list of available endpoints and methods to create and modify users using the Provisioning API.
Endpoints and methods | Description |
---|
GET /user/email/{userEmail} see below | Get user info based on email. |
GET /user/domain/{domainName} see below | Get information about the users in a domain. |
POST /user/internal see below | Add an internal user to a domain. |
PUT /user/email/{userEmail}/domain/{domainName}/role see below | Set the roles of a user in a domain. |
DELETE /user/email/{userEmail}/domain/{domainName}/role see below | Remove roles from a user. |
Endpoints and methods
GET /user/email/{userEmail}
Get basic user info based on email. The information retrieved is not related to any specific 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. |
Find below a request example:
https://api-us.devo.com/probio/user/email/user@devo.com
Response
Code | Description |
---|
200 | Successful response. User info retrieved.
{
"email": "user@devo.com",
"userName": "John",
"phone": "678345678",
"id": "2456-sgfd-2344"
}
|
4xx | Bad request.
{
"error": {
"code": 4xx,
"message": "string"
}
}
|
POST /user/internal
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.
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).
Request
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 |
---|
skipMailValidation required
| boolean
| Set this to true to skip the email address validation step when creating a user for the domain. In this case, the user must already exist in the platform and therefore already have a password. Default value is false . |
Request body
The request JSON body must include the userInfo
object with the following key-value pairs:
Parameter | Type | Description |
---|
domain required
| string
| Domain name. Must match the expression "^[A-Za-z]A-Za-z0-9_-?$". |
userName required
| string
| 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. |
email required
| string
| Enter the email address of the new user. |
role required
| string
| 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
| string
| 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. |
Find below a request example:
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:
{
"domain": "domainName@resellerName",
"userName": "Frank",
"email": "user@devo.com",
"role": "OWNER"
}
Response
Code | Description |
---|
200 | Successful response. User added to the given domain.
{
"email": "user@devo.com",
"userName": "Frank",
"role": "ADMIN",
"domain": "domainName@resellerName",
"owner": true,
"status": "pending",
"roleList": [
"ADMIN"
]
}
|
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"
}
}
|