User
User Management.
Create
Create a new user and optionally send an email invitation to join the service. When the user follows the invitation and registers, their email address wil be confirmed before they are logged into the service.
Endpoint
POST /user/create
Authorized User Role
admin
Request Body
Field | Type | Required | Notes |
---|---|---|---|
string | yes | User email address. | |
role | string | yes | Authorized role. Select from "user", "admin" or "owner". |
sendInvite | boolean | Send an email invitation. |
Response
A user record.
Field | Type | Notes |
---|---|---|
accountId | string | Owning account ID. |
activity | date | Last activity date. |
cloudId | string | Device cloud ID. |
string | User email address. | |
first | string | First name. |
id | string | User ID. |
last | string | Surname. |
role | string | Authorized role. |
Find
Find users by ID or email.
Endpoint
POST /user/find
Authorized User Role
user
Request Body
Field | Type | Role | Notes |
---|---|---|---|
string | admin | Email address. | |
id | string | admin | User ID. |
Response
Paged response.
Field | Type | Notes |
---|---|---|
data | array | An array of merics. |
next | string | Paged cursor to use for the next page of items. |
prev | string | Pages cursor to use for the previous page of items. |
User
Field | Type | Notes |
---|---|---|
accountId | string | Owning account ID. |
activity | date | Last activity date. |
cloudId | string | Device cloud ID. |
string | User email address. | |
first | string | First name. |
id | string | User ID. |
last | string | Surname. |
role | string | Authorized role. |
Get
Get a user by ID or email.
Endpoint
POST /user/get
Authorized User Role
user
Request Body
Field | Type | Role | Notes |
---|---|---|---|
string | admin | Email address. | |
id | string | admin | User ID. |
Response
User Record.
Field | Type | Notes |
---|---|---|
accountId | string | Owning account ID. |
activity | date | Last activity date. |
cloudId | string | Device cloud ID. |
string | User email address. | |
first | string | First name. |
id | string | User ID. |
last | string | Surname. |
role | string | Authorized role. |
Login
Login the authenticated user.
Login the authenticated user. It is expected that the user has already been authenticated by logging into the Cognito service using the details provided by the Builder Cloud/Edit panel under the "API access" section.
Endpoint
POST /user/login
Authorized User Role
public
Request Body
Field | Type | Notes |
---|---|---|
invite | string | Invitation ID. |
register | boolean | Register the user. |
Response
Account and user records with useful cached data.
Field | Type | Notes |
---|---|---|
account | object | The account record for the authenticated user. |
manager | object | The manager (app) record for the authenticated user. |
schema | object | Device Schema. |
user | object | The user record for the authenticated user. |
Account
The account record for the authenticated user.
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. |
Manager
The manager (app) record for the authenticated user.
Field | Type | Notes |
---|---|---|
accountId | string | Owning account ID. |
certArn | string | Certificate ARN. |
cloudFront | string | CloudFront distribution ID. |
cloudId | string | Device cloud ID. |
custom | boolean | Custom domain. |
distributionId | string | CloudFront distribution ID. |
domain | string | Manager domain. |
error | string | Error message. |
id | string | Manager ID. |
name | string | Manager name. |
owner | string | Owner account ID. |
priorDomain | string | Prior domain. |
provisioned | date | When the manager was provisioned. |
region | string | Region. |
title | string | Manager title. |
type | string | Manager type. |
version | string | App version. |
User
The user record for the authenticated user.
Field | Type | Notes |
---|---|---|
accountId | string | Owning account ID. |
activity | date | Last activity date. |
cloudId | string | Device cloud ID. |
string | User email address. | |
first | string | First name. |
id | string | User ID. |
last | string | Surname. |
role | string | Authorized role. |
Remove
Remove a user.
Endpoint
POST /user/remove
Authorized User Role
admin
Request Body
Field | Type | Notes |
---|---|---|
string | Email address. | |
id | string | User ID. |
Update
Update a user identity.
Endpoint
POST /user/update
Authorized User Role
user
Request Body
Field | Type | Notes |
---|---|---|
string | User email address. | |
first | string | User first name. |
id | string | User ID. |
last | string | User last name. |
preferences | object | User preferences. |
Response
User Record.
Field | Type | Notes |
---|---|---|
accountId | string | Owning account ID. |
activity | date | Last activity date. |
cloudId | string | Device cloud ID. |
string | User email address. | |
first | string | First name. |
id | string | User ID. |
last | string | Surname. |
role | string | Authorized role. |
UpdateRole
Update a user role.
Endpoint
POST /user/updateRole
Authorized User Role
admin
Request Body
Field | Type | Role | Notes |
---|---|---|---|
id | string | User ID. | |
role | string | admin | User role. |
sendInvite | boolean | Send an email invitation. |
Response
User Record.
Field | Type | Notes |
---|---|---|
accountId | string | Owning account ID. |
activity | date | Last activity date. |
cloudId | string | Device cloud ID. |
string | User email address. | |
first | string | First name. |
id | string | User ID. |
last | string | Surname. |
role | string | Authorized role. |