Store
This API provides MQTT messages to get/set values from the key/value Store.
If you need a REST API, use the Generic API with the _type set to 'Store'.
Get
Get data from the store
Protocol
1 |
|
Endpoint
1 |
|
Authorized User Role
1 |
|
Request Body
Field | Type |
---|---|
key | string |
Response
Field | Type | Notes |
---|---|---|
accountId | string | Owning account. |
deviceId | string | Owning device. |
key | string | Data item key. |
value | object | Data item value. |
type | string | Data type. Set to "number" or "string". |
updated | date | When data item last updated. |
expires | date | When data item should be deleted. |
Set
Set data in the store
Protocol
1 |
|
Endpoint
1 |
|
Authorized User Role
1 |
|
Request Body
Field | Type | Notes |
---|---|---|
key | string | Data item unique key. |
expires | number | Date when to expire. Set to number of milliseconds since Jan 1, 1970. Date.getTime(). |
value | object | Set to a number or string. |
type | string | Set to "number" or "string". |