Users

These are users (also known as sub-users); additional users who are authorized to use the same account, but are subject to the RBAC system. See the RBAC section for more details.

ListUsers (GET /:account/users)

Returns a list of an account's user objects. These have the same format as the main account object.

Inputs

  • None

Returns

Array of user objects. Each user object has the following fields:

Field

Type

Description

id

UUID

Unique id for this user

login

String

Sub-user login name

email

String

Email address

companyName

String

...

firstName

String

...

lastName

String

...

address

String

...

postalCode

String

...

city

String

...

state

String

...

country

String

...

phone

String

...

created

ISO8601 date

When this user was created

updated

ISO8601 date

When this user's details was last updated

Errors

Error Code

Description

ResourceNotFound

If :account does not exist

CLI Command:

Example Request

Example Response

GetUser (GET /:account/users/:user)

Get one user for an account.

Inputs

Field

Type

Description

membership

Boolean

When given, the user roles will also be returned

Returns

An array of user objects. Each user object has the following fields:

Field

Type

Description

id

UUID

Unique id for this user

login

String

Sub-user login name

email

String

Email address

companyName

String

...

firstName

String

...

lastName

String

...

address

String

...

postalCode

String

...

city

String

...

state

String

...

country

String

...

phone

String

...

roles

Array

User role names (only when membership option is present in request)

default_roles

Array

User active role names (only when membership option is present in request)

created

ISO8601 date

When this user was created

updated

ISO8601 date

When this user's details was last updated

Errors

Error Code

Description

ResourceNotFound

When :account or :user do not exist

CLI Command:

Example Request

Example Response

CreateUser (POST /:account/users)

Creates a new user under an account.

Inputs

Field

Type

Description

email

String

(Required) Email address

login

String

(Required) Login

password

String

(Required) Password

companyName

String

...

firstName

String

...

lastName

String

...

address

String

...

postalCode

String

...

city

String

...

state

String

...

country

String

...

phone

String

...

Returns

User object:

Field

Type

Description

id

UUID

Unique id for this user

login

String

Sub-user login name

email

String

Email address

companyName

String

...

firstName

String

...

lastName

String

...

address

String

...

postalCode

String

...

city

String

...

state

String

...

country

String

...

phone

String

...

created

ISO8601 date

When this user was created

updated

ISO8601 date

When this user's details was last updated

Errors

For all possible errors, see CloudAPI HTTP Responses.

Error Code

Description

InvalidArgument

If any of the parameters are invalid, e.g. you try to add a login name already taken by another user of your account

MissingParameter

If you didn't send a login, email or password

ResourceNotFound

If :account does not exist

CLI Command:

Request:

Response:

UpdateUser (POST /:account/users/:id)

Update a user's modifiable properties.

Note: Password changes are not allowed using this endpoint; there is an additional endpoint (ChangeUserPassword) for password changes so it can be selectively allowed/disallowed for users using policies.

Inputs

Field

Type

Description

login

String

email

String

companyName

String

firstName

String

lastName

String

address

String

postalCode

String

city

String

state

String

country

String

phone

String

Returns

User object:

Field

Type

Description

id

UUID

Unique id for this user

login

String

User login name

email

String

Email address

companyName

String

...

firstName

String

...

lastName

String

...

address

String

...

postalCode

String

...

city

String

...

state

String

...

country

String

...

phone

String

...

created

ISO8601 date

When this user was created

updated

ISO8601 date

When this user's details was last updated

Errors

For all possible errors, see CloudAPI HTTP Responses.

Error Code

Description

InvalidArgument

If any of the parameters are invalid, e.g. you try to add a login name already taken by another user of your account

MissingParameter

If you didn't send a login or email

ResourceNotFound

If :account or :user do not exist

CLI Command:

Request:

Response:

ChangeUserPassword (POST /:account/users/:user/change_password)

This is a separate rule for password changes, so different policies can be used for an user trying to modify other data, or only their own password.

Inputs

Field

Type

Description

password

String

...

password_confirmation

String

string must match password

Returns

User object:

Field

Type

Description

id

UUID

Unique id for the user

login

String

User login name

email

String

Email address

companyName

String

...

firstName

String

...

lastName

String

...

address

String

...

postalCode

String

...

city

String

...

state

String

...

country

String

...

phone

String

...

created

Date (ISO8601)

When this user was created

updated

Date (ISO8601)

When this user's details was last updated

Errors

For all possible errors, see CloudAPI HTTP Responses.

Error Code

Description

InvalidArgument

The provided password and password\_confirmation didn't match

MissingParameter

Either password or password\_confirmation parameters are missing

ResourceNotFound

If :account or :user do not exist

CLI Command:

Example Request

Example Response

DeleteUser (DELETE /:account/users/:user)

Remove a user. They will no longer be able to use this API.

Inputs

  • None

Returns

  • None

Errors

For all possible errors, see CloudAPI HTTP Responses.

Error Code

Description

ResourceNotFound

If :account does not exist or there isn't a user with either the login or id given as :user value

CLI Command:

Example Request

Example Response

Last updated

Was this helpful?