Find us at our new Help Center where we've combined our documentation and knowledgebase articles in one easy-to-search location.
We aren't updating the Developer Portal anymore, except for the Element Docs — all updates happen in the Help Center. We're retiring the Developer Portal as you know it in:
Organization administrators can manage the users related all accounts in your organization, while account administrators can manage users in specific accounts with the /users endpoint. You can create, retrieve, update, delete, and search users. To manage users, you must include a valid Organization Secret and the User Secret of an organization administrator in the header of any API requests to /user. If any requests come from someone else, even a user that you add to the default account, they will receive a 401 Unauthorized error code.
You can see all users in your organization with GET /users.
| Name | Description | Required |
|---|---|---|
| where | The CEQL search expression is a where clause like in a typical SQL query, but without the WHERE keyword. For example, to search for accounts created on or after ‘Jan 15, 2017′, use a search expression like . If you do not use a CEQL query, the endpoint returns all users in a paginated fashion. |
N |
| nextPage | The next page token. Found in the header of the previous search | N |
| pageSize | The page size for the paginated results.Default 200 | N |
curl -X GET \
https://api.cloud-elements.com/elements/api-v2/users/ \
-H 'authorization: User <USER_SECRET>, Organization <ORGANIZATION_SECRET>' \
-H 'content-type: application/json' \
[
{
"id": 3805,
"createdDate": "2017-07-10",
"firstName": "Neta",
"password": "secured",
"email": "Alfaro@mycompany.com",
"active": true,
"lastName": "Alfaro",
"accountExpired": false,
"accountLocked": false,
"credentialsExpired": true,
"lastLoginDate": "2017-07-10",
"emailValid": true,
"accountNonExpired": false,
"credentialsNonExpired": false,
"accountNonLocked": true,
"enabled": false,
"fullName": "Neta Alfaro"
},
{
"id": 3531,
"createdDate": "2017-04-25",
"firstName": "Sharda",
"password": "secured",
"email": "ShardaSisson@mycompany.com",
"active": true,
"lastName": "Sisson",
"accountExpired": false,
"accountLocked": false,
"credentialsExpired": false,
"lastLoginDate": "2017-04-25",
"emailValid": true,
"accountNonExpired": true,
"credentialsNonExpired": true,
"accountNonLocked": true,
"enabled": true,
"fullName": "Sharda Sisson"
},
{
"id": 3486,
"createdDate": "2017-04-13",
"firstName": "Tod",
"password": "secured",
"email": "TodLinares@mycompany.com",
"active": true,
"lastName": "Linares",
"accountExpired": false,
"accountLocked": false,
"credentialsExpired": false,
"lastLoginDate": "2017-04-14",
"emailValid": true,
"accountNonExpired": true,
"credentialsNonExpired": true,
"accountNonLocked": true,
"enabled": true,
"fullName": "Tod Linares"
}
]
The attribute names in the JSON response appear in code format.
GET /users returns all fields except some fields where we specify the endpoint that returns the fields in the Endpoint Response column.
| Name | Description | Endpoint Response |
|---|---|---|
ID id |
The unique identifier for a user within an account. Use in any /users endpoint with an {id} variable. |
|
CreatedcreatedDate |
The date when someone created the account. | |
First NamefirstName |
The first name of the user. | |
Last NamelastName |
The last name of the user. | |
password |
A placeholder for the user's secure password. | |
Emailemail |
The email address of the user. The email receives all password reset emails. | |
Activeactive |
Indicates if the account is active. In the JSON response true is active and false is inactive. |
|
User Secretsecret |
The User Secret required for API calls to Cloud Elements APIs. You can also find your User Secret in the profile menu in Cloud Elements. | POST /accounts/{id}/users GET /users/{emailOrId} if password provided |
lastLoginDate |
The date that the user last logged in to Cloud Elements 2.0, or the date that someone created the account . | |
fullName |
The first and last name of the user. | |
Org Admin/Account Adminroles |
The roles assigned to the user. | POST /accounts/{id}/usersGET /users/{id}/roles |
The following user attributes appear if the user signed up using Google or GitHub:
oauthProvideroauthIdoauthTokenThe following user attributes are deprecated and you can ignore them:
accountExpiredaccountLockedcredentialsExpiredemailValidaccountNonLockedcredentialsNonExpiredaccountNonExpiredenabledBecause you must associate each user with an account, you use an account id and the POST /accounts/{accountId}/users endpoint. See Add Users to Accounts.
You can get information about a specific user with the user id or email and the GET/users/{emailOrId} endpoint. If you know the user's password, you can also retrieve the user secret.
You can also get a specific user of an account with the account id, the user id or email, and the GET/accounts/{id}/users/{emailOrId} endpoint.
| Name | Description | Required |
|---|---|---|
| id (user) | The unique identifier for a user within an account. Use in any /users endpoint with an {id} variable. |
Y or email |
| The email address of the user. | Y or id |
|
| elements-user-password | Header parameter that is the password associated with the user ID in a GET/users/{emailOrId} request. |
N |
| id (user) | Y if using GET/accounts/{id}/users/{emailOrId} |
To get a list of users including ids see Get All Users. To get a list of accounts including ids see [Find Accounts.
GET/users/{emailOrId} with user ID
curl -X GET \
https://api.cloud-elements.com/elements/api-v2/users/3814 \
-H 'authorization: User <USER_SECRET>, Organization <ORGANIZATION_SECRET>' \
-H 'content-type: application/json' \
GET/users/{emailOrId} with user ID and user password
curl -X GET \
https://api.cloud-elements.com/elements/api-v2/users/3814 \
-H 'authorization: User <USER_SECRET>, Organization <ORGANIZATION_SECRET>' \
-H 'content-type: application/json' \
-H 'elements-user-password: <USER_PASSWORD>' \
GET/users/{emailOrId} with email
curl -X GET \
https://api.cloud-elements.com/elements/api-v2/users/shardasisson@mycompany.com \
-H 'authorization: User <USER_SECRET>, Organization <ORGANIZATION_SECRET>' \
-H 'content-type: application/json' \
GET/accounts/{id}/users/{emailOrId} with account id and user id
curl -X GET \
https://api.cloud-elements.com/elements/api-v2/accounts/4046/users/3833 \
-H 'authorization: User <USER_SECRET>, Organization <ORGANIZATION_SECRET>' \
-H 'content-type: application/json' \
{
"id": 3833,
"createdDate": "2017-07-13",
"firstName": "Sharda",
"email": "shardasisson@mycompany.com",
"active": true,
"lastName": "Sisson",
"accountExpired": false,
"accountLocked": false,
"credentialsExpired": false,
"secret": "qp8ExXXXXXXXXXXXXXXXXXX",
"lastLoginDate": "1970-01-01",
"emailValid": true,
"accountNonExpired": true,
"credentialsNonExpired": true,
"accountNonLocked": true,
"enabled": true,
"fullName": "Sharda Sisson"
}
You can assign the following roles to Cloud Elements users with the PUT /users/id/roles/role/rolekey endpoint:
org-admin)admin)You can also assign roles when you update users with the PATCH /users/{id} endpoint.
| Name | Description | Required |
|---|---|---|
| id | The unique identifier for a user within an account. Use in any /users endpoint with an {id} variable. |
Y |
| key | The unique identifier for each role type. Use org-admin for the Organization Administrator role. Use admin for an Account Administrator. Use org for a default account user. |
Y |
Assign Organization Administrator Role
curl -X PUT \
https://staging.cloud-elements.com/elements/api-v2/users/4378/roles/org-admin \
-H 'authorization: User <USER_SECRET>, Organization <ORGANIZATION_SECRET>' \
-H 'content-type: application/json' \
Assign Account Administrator Role
curl -X PUT \
https://staging.cloud-elements.com/elements/api-v2/users/4378/roles/admin \
-H 'authorization: User <USER_SECRET>, Organization <ORGANIZATION_SECRET>' \
-H 'content-type: application/json' \
{
"id": 930,
"name": "Organization Administrator",
"key": "org-admin",
"active": true,
"description": "Organization Administrator",
"features": []
}
If you no longer want a user to be an organization or account administrator, you can remove roles using the DELETE /users/{userId}/roles/{roleKey} endpoint with the user id and the role key of the role to remove.
| Name | Description | Required |
|---|---|---|
| id | The unique identifier for a user within an account. Use in any /users endpoint with an {id} variable. |
Y |
| key | The unique identifier for each role type. Use org-admin for the Organization Administrator role. Use admin for an Account Administrator. Use org for a default account user. |
Y |
To get a list of roles assigned to a user make a GET /users/{id}/roles request.
```bash
curl -X PUT \
https://staging.cloud-elements.com/elements/api-v2/users/4378/roles/org-admin \
-H 'authorization: User <USER_SECRET>, Organization <ORGANIZATION_SECRET>' \
-H 'content-type: application/json' \
```
Cloud Elements returns a response with a code of 200 indicating success. You can check to see the roles assigned to the user with a GET /users/{id}/roles request.
Change the password, firstName, lastName, or email of a specific user or assign roles with the user id and the PATCH /users/{id} endpoint.
| Name | Description | Required |
|---|---|---|
| id | The unique identifier for a user within an account. Use in any /users endpoint with an {id} variable. |
Y |
To get a list of users including ids see Get All Users.
curl -X PATCH \
https://api.cloud-elements.com/elements/api-v2/users/3833 \
-H 'authorization: User <USER_SECRET>, Organization <ORGANIZATION_SECRET>' \
-H 'content-type: application/json' \
-d '{
"firstName": "Sharda",
"email": "shardhughes@mycompany.com",
"lastName": "Hughes",
"password": "password",
"roles":[
{
"key": "admin"
}
]
}'
The password appears in the response only if you change the password.
{
"id": 3833,
"firstName": "Sharda",
"password": "password",
"email": "shardhughes@mycompany.com",
"active": true,
"lastName": "Hughes",
"accountExpired": false,
"accountLocked": false,
"credentialsExpired": true,
"roles": [
{
"id": 15,
"name": "Administrator",
"key": "admin",
"active": true,
"description": "Cloud Elements Application Administrator.",
"features": []
}
],
"emailValid": true,
"accountNonLocked": true,
"credentialsNonExpired": false,
"accountNonExpired": true,
"enabled": true,
"fullName": "Sharda Hughes"
}
You can deactivate a user or activate an already deactivated user with the user id and the PATCH /users/{id} endpoint. After you deactivate a user, they still appear in Cloud Elements 2.0, but can no longer access the Cloud Elements APIs. Deactivating a user also stops all active jobs associated with the user.
?permanent=true to the request as a query parameter. For example, https://api.cloud-elements.com/elements/api-v2/users/3833?permanent=true. | Name | Description | Required |
|---|---|---|
| id | The unique identifier for an account within an organization. Use in any /accounts endpoint with an {id} variable. |
Y |
| active | Set to false to deactivate a user and set to true to activate a user. |
Boolean |
| permanent | Query parameter. When active is also set to false and permanent is set to true, Cloud Elements discards all instances associated with the user. |
Boolean |
curl -X PATCH \
https://api.cloud-elements.com/elements/api-v2/users/3833 \
-H 'authorization: User <USER_SECRET>, Organization <ORGANIZATION_SECRET>' \
-H 'content-type: application/json' \
-d '{
"active": false
}
'
To reactivate a deactivated user, set active to true.
{
"id": 3833,
"firstName": "Sharda",
"email": "shardahughes@mycompany.com",
"active": false,
"lastName": "Hughes",
"accountExpired": false,
"accountLocked": false,
"credentialsExpired": true,
"emailValid": true,
"accountNonLocked": true,
"accountNonExpired": false,
"credentialsNonExpired": false,
"enabled": false,
"fullName": "Sharda Hughes" }
If you reactivate a user, active is set to true in the response.
See User Attributes for descriptions of each attribute.
Delete users with the user id and the DELETE /accounts/{id} endpoint. You cannot recover deleted users. If you think that you might need to access the user later, consider deactivating the user instead.
| Name | Description | Required |
|---|---|---|
| id | The unique identifier for a user within an account. Use in any /users endpoint with an {id} variable. |
Y |
To get a list of users including ids see Get All Users.
curl -X DELETE \
https://api.cloud-elements.com/elements/api-v2/users/3814 \
-H 'authorization: User <USER_SECRET>, Organization <ORGANIZATION_SECRET>' \
-H 'content-type: application/json' \
Cloud Elements returns a code of 200 indicating success. You can confirm that you deleted the user with GET /users/{id}.