organizations/users
endpoints to manage users in your organization.
GET /organizations/users
Retrieve a list of users in an organization.
List Organization 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 users created on or after 'Jan 15, 2014’, the search expression will be where=createdDate >= ‘2014-01-15’. When this parameter is omitted, all users 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 |
List Organization Users 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. |
List Organization Users Example Request
curl -X GET \
https://api.cloud-elements.com/elements/api-v2/organizations/users?where=active%3D%true%60&offset=0&pageSize=100 \
-H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \
-H 'Content-Type: application/json' \
List Organization Users 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 /organizations/users/{emailOrId:.+}
Retrieve a specific user in the organization 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-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/organizations/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 /organizations/users
As an organization administrator, you can add a user to your organization.
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 Organization 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 Organization Users Example Request
curl -X POST \ https://api.cloud-elements.com/elements/api-v2/organizations/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 Organization 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 /organizations/users/{{id}}
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 Organization Users Path Parameters
id | The id associated with a specific user. |
Update Organization 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 Organization Users Example Request
curl -X PATCH \ https://api.cloud-elements.com/elements/api-v2/organizations/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 Organization 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 /organizations/users/{{id}}
Delete a user in the organization. You cannot recover deleted users. If you think that you might need to access the user later, consider deactivating the user instead.
Delete Organization Users Path Parameters
id | The id associated with a specific user. |
Delete Organization Users Example Request
curl -X DELETE \
https://api.cloud-elements.com/elements/api-v2/organizations/users/178592 \
-H 'authorization: User sAfK7LJGNz5ZHcNrvdJvLI=f03WbTbH6aRKc0HJ3oOIi, Organization 58168435e3b9959a929eb04b6218b9a2' \
-H 'content-type: application/json' \
Delete Organization Users Example Response
A response with a 200 Status Code indicates success. You can confirm that you deleted the user with GET /organizations/users
.