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
MQTTEndpoint
mqtt: /store/getAuthorized User Role
deviceRequest Body
| Field | Type | Notes |
|---|---|---|
| key | string | Data item unique key. |
Response
Store Record.
| Field | Type | Notes |
|---|---|---|
| accountId | string | |
| created | date | |
| deviceId | string | |
| key | string | |
| role | string | Role that can access this item. |
| value | object | |
| type | string | |
| updated | date | |
| expires | date | |
| _source | string |
Set
Set data in the store.
Protocol
MQTTEndpoint
mqtt: /store/setAuthorized User Role
deviceRequest 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". |
