Custom Device Data

Custom Device Data

⚠️
NOTE: This part of the API is still under construction, yet the interface as described below is expected to be somewhat stable.

You can attach arbitrary JSON data to a device. This data will be included as customData in all MQTT messages forwarded for that device via the MQTT API.

GET

Endpoint

GET /care-homes/<locationId>/devices/<deviceId>/custom-data

Expected responses

200 OK

{
  "foo": {
    "bar": "baz"
  }
}

or

{}

for devices with no custom data.

PATCH

Endpoint

PATCH /care-homes/<locationId>/devices/<deviceId>/custom-data

Payload

{
  "foo": {
    "bar": "baz"
  }
}

Expected responses

Code Description
200 The custom data was successfully updated.
400 The payload is not valid JSON or exceeds the maximum size of 1024 bytes.