Token
Manage Access Tokens.
Action
Perform a token action: delete, new, resume, revoke, suspend.
Endpoint
HTTP
POST /token/action
Authorized User Role
admin
Request Body
Field | Type | Notes |
---|---|---|
action | string | Action: delete, new, resume, revoke, suspend. |
tokens | array | Tokens to act on. |
Create
Create a new token.
Endpoint
HTTP
POST /token/create
Authorized User Role
admin
Request Body
Field | Type | Notes |
---|---|---|
cloudId | string | Cloud ID. |
description | string | Description. |
enable | boolean | Enable. |
expires | date | Expires. |
role | string | Authorized role granted by token. |
type | string | Token type: BuilderAPI, CloudAPI, CloudToBuilder, DeviceToCloud, ProductID. |
Response
Token Record.
Field | Type | Notes |
---|---|---|
accountId | string | Owning account ID. |
description | string | Token description. |
enable | boolean | Token enabled. |
expires | date | Token expiration date. |
id | string | Token ID. |
owner | string | Token owner. |
role | string | Token role. |
type | string | Token type. |
Find
Find matching tokens.
Endpoint
HTTP
POST /token/find
Authorized User Role
admin
Request Body
Field | Type | Notes |
---|---|---|
id | string | Token ID. |
cloudId | string | Cloud ID. |
enable | boolean | Enable. |
type | string | Token type: BuilderAPI, CloudAPI, CloudToBuilder, DeviceToCloud, ProductID. |
Query String Options
Field | Type | Default | Notes |
---|---|---|---|
index | string | Index name: primary or gs1. | |
limit | number | Limit number of results. | |
next | object | Token for next page. | |
prev | object | Token for previous page. |
Response
Paged response.
Field | Type | Notes |
---|---|---|
data | array | A token object. |
next | string | Paged cursor to use for the next page of items. |
prev | string | Pages cursor to use for the previous page of items. |
Token
Field | Type | Notes |
---|---|---|
accountId | string | Owning account ID. |
description | string | Token description. |
enable | boolean | Token enabled. |
expires | date | Token expiration date. |
id | string | Token ID. |
owner | string | Token owner. |
role | string | Token role. |
type | string | Token type. |
Get
Get a token by ID.
Endpoint
HTTP
POST /token/get
Authorized User Role
admin
Request Body
Field | Type | Notes |
---|---|---|
id | string | Token ID. |
cloudId | string | Cloud ID. |
enable | boolean | Enable. |
type | string | Token type: BuilderAPI, CloudAPI, CloudToBuilder, DeviceToCloud, ProductID. |
Query String Options
Field | Type | Default | Notes |
---|---|---|---|
index | string | Index name: primary or gs1. | |
limit | number | Limit number of results. | |
next | object | Token for next page. | |
prev | object | Token for previous page. |
Response
Token Record.
Field | Type | Notes |
---|---|---|
accountId | string | Owning account ID. |
description | string | Token description. |
enable | boolean | Token enabled. |
expires | date | Token expiration date. |
id | string | Token ID. |
owner | string | Token owner. |
role | string | Token role. |
type | string | Token type. |
Remove
Remove a token.
Endpoint
HTTP
POST /token/remove
Authorized User Role
admin
Request Body
Field | Type | Notes |
---|---|---|
cloudId | string | Cloud ID. |
id | string | Token ID. |
Update
Update a token.
Endpoint
HTTP
POST /token/update
Authorized User Role
admin
Request Body
Field | Type | Notes |
---|---|---|
cloudId | string | Cloud ID. |
description | string | Description. |
enable | boolean | Enable. |
expires | date | Expires. |
id | string | Token ID. |
role | string | Authorized role granted by token. |
type | string | Token type: BuilderAPI, CloudAPI, CloudToBuilder, DeviceToCloud, ProductID. |
Response
Token Record.
Field | Type | Notes |
---|---|---|
accountId | string | Owning account ID. |
description | string | Token description. |
enable | boolean | Token enabled. |
expires | date | Token expiration date. |
id | string | Token ID. |
owner | string | Token owner. |
role | string | Token role. |
type | string | Token type. |