Manage Users APIs

Use the base accounts /users endpoints to manage the users in your organization.


List Users

GET /users

Retrieve a list of users in your organization. 

List Users 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.
nextPage
The next page token. Found in the header of the previous search
pageSize
The page size for the paginated results, defaults to 200

List Users Response Fields

NameDescription
ID
id
The unique identifier for a user within an account. Use in any /users endpoint with an {id} variable.
Created
createdDate
The date when someone created the account.
First Name
firstName
The first name of the user.
Last Name
lastName
The last name of the user.
passwordA placeholder for the user's secure password.
Email
email
The email address of the user. The email receives all password reset emails.
Active
active
Indicates if the account is active. In the JSON response, true is active and false is inactive.
User Secret
secret
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.
lastLoginDateThe date that the user last logged in to Cloud Elements, or the date that someone created the account .
fullNameThe first and last name of the user.
Org Admin/Account Admin
roles
The roles assigned to the user.

List Users Example Request

curl -X GET \
https://api.cloud-elements.com/elements/api-v2/users?where=active%3D%true%60&pageSize=100 \
-H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \
-H 'Content-Type: application/json' \

List Users Example Response

[  
  {  
    "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"
  }
]

Retrieve a User by Id or Email

GET /users/{emailOrId}

Retrieve a specific user by user id or email. 

Retrieve a User by Id or Email Path Parameters

emailOrId
The id or email address associated with the user.

Retrieve a User by Id or Email Header Parameters

Elements-User-PasswordOptional user 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/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",
    "email":"firstlast@cloud-elements.com",
    "active":true,
    "lastName":"last",
    "accountExpired":false,
    "accountLocked":false,
    "credentialsExpired":false,
    "secret": "wGOw+75xqzBhek=/cP8wm3SPSNggfTZp1GFLtwfYzV0r"
    "lastLoginDate":"2018-03-07",
    "accountNonLocked":true,
    "credentialsNonExpired":true,
    "accountNonExpired":true,
    "enabled":true,
    "fullName":"First Last"
  }
]

Update Users

PATCH /users/{id}

You can make the following updates to a user:

  • Change the password, firstName, lastName, or email .
  • Assign roles to a user.
  • Activate or deactivate a with the active parameter.

Update Users Path Parameters

userId
The id associated with a specific user.

Update 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:
  • Organization Administrator (org-admin)
  • Account Administrator (admin)
activeDeactivate by sending "active"= false.
Activate by sending "active"= true.

Update Users Example Request

curl -X PATCH \
  https://api.cloud-elements.com/elements/api-v2/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 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 a User

DELETE /users/{id}

Delete a user in your organization. You cannot recover deleted users. If you think that you might need to access the user later, consider deactivating the user instead.

Delete a User Path Parameters

userId
The id associated with a specific user.

Delete a User Example Request

curl -X DELETE \
  https://api.cloud-elements.com/elements/api-v2/users/161268 \
  -H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \
  -H 'content-type: application/json' \

Delete a User Example Response

The response is empty. You can confirm that you deleted the account with GET /users