#include <include/net/nrf_cloud_rest.h>
Send a JSON formatted device message using the SendDeviceMessage endpoint.
- Parameters
-
[in,out] | rest_ctx | Context for communicating with nRF Cloud's REST API. |
[in] | device_id | Null-terminated, unique device ID registered with nRF Cloud. |
[in] | json_msg | Null-terminated JSON string containing the device message. |
[in] | bulk | Use the bulk message topic. If true, the topic parameter is ignored. |
[in] | topic | Optional; null-terminated MQTT topic string. If NULL, the d2c topic is used. |
- Return values
-
0 | If successful. Otherwise, a (negative) error code is returned. See "nRF Cloud: Request Failure" for details. |