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
MQTT
Endpoint
mqtt: /store/get
Authorized User Role
device
Request Body
Field | Type | Notes |
---|---|---|
key | string | Data item unique key. |
Response
Store Record.
Field | Type |
---|---|
accountId | string |
deviceId | string |
key | string |
value | object |
type | string |
updated | date |
expires | date |
_source | string |
Set
Set data in the store.
Protocol
MQTT
Endpoint
mqtt: /store/set
Authorized User Role
device
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". |