accounts/users
endpoints to manage users in your accounts.
GET /accounts/{id}/users
Retrieve a list of users in an account.
Path Parameters
id | The unique identifier for an account within an organization. |
Query Parameters
where | The CEQL search expression or the where clause, without the WHERE keyword, in a typical SQL query. For example, to search for accounts created on or after 'Jan 15, 2014’, the search expression will be where=createdDate >= ‘2014-01-15’. When this parameter is omitted, all accounts are returned in a paginated fashion. |
offset | The record offset at which to begin the paginated results, defaults to 0 |
pageSize | The page size for the paginated results, defaults to 200 |
Response Fields
Name | Description |
---|---|
IDid | 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. |
lastLoginDate | The date that the user last logged in to Cloud Elements, 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. |
Example Request
curl -X GET \
https://api.cloud-elements.com/elements/api-v2/accounts/156162/users?where=active%3D%true%60&offset=0&pageSize=100 \
-H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \
-H 'Content-Type: application/json' \
Example Response
[
{
"id":160255,
"createdDate":"2017-01-18",
"firstName":"Claude",
"password":"secured",
"email":"docs@cloud-elements.com",
"active":true,
"lastName":"Elements",
"accountExpired":false,
"accountLocked":false,
"credentialsExpired":false,
"roles":[
],
"lastLoginDate":"2018-03-07",
"accountNonLocked":true,
"credentialsNonExpired":true,
"accountNonExpired":true,
"oauthToken":"PcbSwu2YO0vBW67CgRnBe1Vb-28PAtmg49lrBOv6zKvE2fGOV.HuQOGeYkA8eA0qOX5matRgFTeRRn5qlcctYG9Te3P1rnZe9Ao58yFCmgPluf9t6N96SpuHTr9D9hnIBiq3",
"oauthId":"768148160538653906416",
"oauthProvider":"Google",
"emailValid":true,
"enabled":true,
"fullName":"Claude Elements"
}
]
GET /accounts/{id}/users/{emailOrId:.+}
Retrieve a specific user in an account by user id or email.
Retrieve a User by Id or Email Path Parameters
id | The unique identifier for an account within an organization. |
emailOrId:.+ | The id or email address associated with the user. |
Retrieve a User by Id or Email Header Parameters
Elements-User-Password | The user’s password. If you include the correct password the response body includes the user secret. |
Retrieve a User by Id or Email Example Request
curl -X GET \
https://api.cloud-elements.com/elements/api-v2/accounts/161268/users/firstlast@cloud-elements.com\
-H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \ \
-H 'Content-Type:application/json' \
-H 'Elements-User-Password:password' \
Retrieve a User by Id or Email Example Response
[ { "id":160255, "createdDate":"2017-01-18", "firstName":"first", "password":"secured", "email":"firstlast@cloud-elements.com", "active":true, "lastName":"last", "accountExpired":false, "accountLocked":false, "credentialsExpired":false, "roles":[ ], "secret": "wGOw+75xqzBhek=/cP8wm3SPSNggfTZp1GFLtwfYzV0r"
"lastLoginDate":"2018-03-07", "accountNonLocked":true, "credentialsNonExpired":true, "accountNonExpired":true, "enabled":true, "fullName":"First Last" } ]
POST /accounts/{id}/users
As an organization administrator or account administrator, you can add users to the organization (organization administrator only) or to an account (account administrator and organization administrator).
After you create a user, they do not receive any notification. This is because many users do not need to access Cloud Elements directly. If the new user needs to access Cloud Elements, either provide them with the password that you entered or encourage them to reset their password.
Create Account Users Path Parameters
id | The unique identifier for an account within an organization. |
Create Account Users Request Body Parameters
firstName | The first name of the user. | Required |
lastName | The last name of the user. | Required |
email | The email address of the user. The email receives all password reset emails. | Required |
password | The assigned password for the user. | Required |
city | Optional | |
country | Optional | |
phone | Optional | |
postalCode | Optional | |
stateProvince | Optional | |
street1 | Optional | |
street2 | Optional | |
roles | An object containing role assignment, which can be:
|
Create Account Users Example Request
curl -X POST \ https://api.cloud-elements.com/elements/api-v2/accounts/161268/users \ -H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \ -H 'content-type: application/json' \ -d '{ "firstName": "First", "lastName": "Last", "email": "firstlast@cloud-elements.com",
"password": "password",
"roles":[ { "key": "admin" } ] } '
Create Account Users Example Response
[ { "id":160255, "createdDate":"2017-01-18", "firstName":"first", "password":"secured", "email":"
firstlast@cloud-elements.com
", "active":true, "lastName":"last", "accountExpired":false, "accountLocked":false, "credentialsExpired":false, "roles":[ ], "secret": "wGOw+75xqzBhek=/cP8wm3SPSNggfTZp1GFLtwfYzV0r""lastLoginDate":"2018-03-07", "accountNonLocked":true, "credentialsNonExpired":true, "accountNonExpired":true, "enabled":true, "fullName":"First Last" } ]
PATCH /accounts/{id}/users/{userId}
You can make the following updates to a user:
- Change the
password
,firstName
,lastName
, oremail
. - Assign roles to a user.
- Activate or deactivate a with the
active
parameter.
Update Account Users Path Parameters
id | The unique identifier for an account within an organization. |
userId | The id associated with a specific user. |
Update Account Users Request Body Parameters
firstName | The first name of the user. |
lastName | The last name of the user. |
email | The email address of the user. The email receives all password reset emails. |
password | The assigned password for the user. |
roles | An object containing role assignment, which can be:
|
active | Deactivate by sending "active"= false .Activate by sending "active"= true . |
Update Account Users Example Request
curl -X PATCH \ https://api.cloud-elements.com/elements/api-v2/accounts/161268/users/178592 \ -H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \ -H 'content-type: application/json' \ -d '{ "firstName": "First", "lastName": "Last", "email": "firstlast@cloud-elements.com",
"password": "password",
"roles:[
{
"key": "admin"
}
] } '
Update Account Users Example Response
[ { "id":160255, "createdDate":"2017-01-18", "firstName":"first", "password":"secured", "email":"
firstlast@cloud-elements.com
", "active":true, "lastName":"last", "accountExpired":false, "accountLocked":false, "credentialsExpired":false, "roles":[ ], "secret": "wGOw+75xqzBhek=/cP8wm3SPSNggfTZp1GFLtwfYzV0r""lastLoginDate":"2018-03-07", "accountNonLocked":true, "credentialsNonExpired":true, "accountNonExpired":true, "enabled":true, "fullName":"First Last" } ]
DELETE /accounts/{id}/users/{userId}
Delete a user in a specific account. You cannot recover deleted users. If you think that you might need to access the user later, consider deactivating the user instead.
Delete Account Users Path Parameters
id | The unique identifier for an account within an organization. |
userId | The id associated with a specific user. |
Delete Account Users Example Request
curl -X DELETE \
https://api.cloud-elements.com/elements/api-v2/accounts/161268/users/178592 \
-H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \
-H 'content-type: application/json' \
Delete Account Users Example Response
A response with a 200 Status Code indicates success. You can confirm that you deleted the user with GET /accounts/{id}/users
.