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
HTTP
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 | |
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
Endpoint
HTTP
POST /user/get
Authorized User Role
user
Request Body
Field | Type | Role |
---|---|---|
string | admin | |
id | string | admin |
Response
Field | Type | Notes |
---|---|---|
accountId | string | Owning account ID. |
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
Endpoint
HTTP
POST /user/find
Authorized User Role
user
Request Body
Field | Type | Role |
---|---|---|
string | admin | |
id | string | admin |
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
An array of User items.
Field | Type | Notes |
---|---|---|
accountId | string | Owning account ID. |
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
Endpoint
HTTP
POST /user/login
Authorized User Role
public
Request Body
Field | Type |
---|---|
invite | string |
register | boolean |
Response
Account and user records with useful cached data.
Field | Type | Notes |
---|---|---|
account | object | |
user | object |
Account
Field | Type | Notes |
---|---|---|
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. |
User
Field | Type | Notes |
---|---|---|
accountId | string | Owning account ID. |
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
Endpoint
HTTP
POST /user/remove
Authorized User Role
admin
Request Body
Field | Type |
---|---|
string | |
id | string |
Update
Update a user identity
Endpoint
HTTP
POST /user/update
Authorized User Role
user
Request Body
Field | Type |
---|---|
string | |
first | string |
id | string |
last | string |
preferences | object |
Response
Field | Type | Notes |
---|---|---|
accountId | string | Owning account ID. |
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
Endpoint
HTTP
POST /user/updateRole
Authorized User Role
admin
Request Body
Field | Type | Role |
---|---|---|
id | string | |
role | string | admin |
sendInvite | boolean |
Response
Field | Type | Notes |
---|---|---|
accountId | string | Owning account ID. |
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. |