Account
Account Management
Account APIs operate on the user account utilized when obtaining the login AccessToken. If using a CloudAPI token, which provides the owner role capability, the target account can be provided via the accountId request property to most APIs.
Accounts are created by the User.login API when a new user first logs in.
Close
Close account.
Close an account and remove all allocated resources. This will remove all users, devices, dashboards, and the account itself. This operation cannot be reversed.
This API can be invoked by a user closing their app account. It can also be invoked to close any user account if caller has the owner role via the CloudAPI token.
Endpoint
POST /account/close
Authorized User Role
admin
Request Body
Field | Type | Role | Notes |
---|---|---|---|
id | string | owner | If specified, close this account vs close own account. |
Get
Get account.
Get an account that matches the supplied properties. If no email or id provided, return the logged in account.
Endpoint
POST /account/get
Authorized User Role
user
Request Body
Field | Type | Role | Notes |
---|---|---|---|
id | string | owner | Query by account ID. |
string | owner | Query by email. |
Query String Options
Field | Type | Role | Notes |
---|---|---|---|
index | string | owner | Database index name: primary or gs1. |
Response
Account Record.
Field | Type | Notes |
---|---|---|
activity | date | Last activity date. |
closed | boolean | Set to true when account closed. |
cloudId | string | Owning device cloud ID. |
created | date | Date account created. |
string | Account email. | |
id | string | Unique account ID. |
name | string | Account or company name. |
Find
Find accounts.
Find a list of accounts that match the supplied properties. If no email or id provided, return list of accounts.
Endpoint
POST /account/find
Authorized User Role
admin
Request Body
Field | Type | Role | Notes |
---|---|---|---|
id | string | admin | Query by account ID. |
string | admin | Query by email address. |
Query String Options
Field | Type | Default | Role | Notes |
---|---|---|---|---|
index | string | owner | Database index name: primary or gs1. | |
limit | number | Number of items to retrieve. | ||
next | object | Pagination token for the next page. | ||
prev | object | Pagination token for the previous page. |
Response
Paged response.
Field | Type | Notes |
---|---|---|
data | array | Array of items. |
next | string | Paged cursor to use for the next page of items. |
prev | string | Pages cursor to use for the previous page of items. |
Account
Field | Type | Notes |
---|---|---|
activity | date | Last activity date. |
closed | boolean | Set to true when account closed. |
cloudId | string | Owning device cloud ID. |
created | date | Date account created. |
string | Account email. | |
id | string | Unique account ID. |
name | string | Account or company name. |
UpdateIdentity
Update the account name and email address. If the role of "owner" is used, the account name and email address can be updated for any account. If the role of "user" is used, the account name and email address can only be updated for the logged in account.
Endpoint
POST /account/updateIdentity
Authorized User Role
admin
Request Body
Field | Type | Role | Notes |
---|---|---|---|
id | string | owner | Account ID. |
string | Account email address. | ||
name | string | Account or company name. |
Response
Updated account record.
Field | Type | Notes |
---|---|---|
activity | date | Last activity date. |
closed | boolean | Set to true when account closed. |
cloudId | string | Owning device cloud ID. |
created | date | Date account created. |
string | Account email. | |
id | string | Unique account ID. |
name | string | Account or company name. |