Messages

SendDeviceMessage

Allows a user or IP device to send a message that is subsequently published over an MQTT topic, on behalf of the IP device whose deviceId is specified. The device ID for the message comes from the topic. For instance, if the topic property on the request is m/d/nrf-352656101081837/d2c/custom, the device ID determined for the message will be 'nrf-352656101081837'.

For dictionary based binary logs via the d2c/bin topic, the message must be base64 encoded. For instance, for the device nrf-352656101081837 the request body would be:

{
  "topic": "d/nrf-352656101081837/d2c/bin",
  "message": "blJGQwAAAAAd2qCkkAEAAAEAAABoZWxsbyB3b3JsZA=="
}

For more information, see Sending device messages.

post/devices/{deviceId}/messages

Path parameters

deviceIdstring required

This is the canonical device id used in the device certificate, and as the MQTT client id.

Example:nrf-1234567890123456789000

Request body

topicstring

A string specifying an MQTT topic.

Example request

{
  "topic": "d/7e8f29fa-cb04-4351-a7c4-3917649d2d36/d2c/bulk",
  "message": [
    {
      "temp": 59,
      "units": "F",
      "ts": 1631470795000
    },
    {
      "temp": 54,
      "units": "F",
      "ts": 1631557195000
    }
  ]
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.