nRF Connect SDK API 2.8.0
Loading...
Searching...
No Matches

◆ nrf_cloud_rest_alert_send()

int nrf_cloud_rest_alert_send ( struct nrf_cloud_rest_context *const rest_ctx,
const char *const device_id,
enum nrf_cloud_alert_type type,
float value,
const char * description )

#include <include/net/nrf_cloud_alert.h>

Transmit the specified alert to nRF Cloud using REST.

Parameters
[in,out]rest_ctxContext for communicating with nRF Cloud's REST API.
[in]device_idNull-terminated, unique device ID registered with nRF Cloud.
[in]typeThe type of alert.
[in]valueOptional numeric value associated with the alert. If set to NRF_CLOUD_ALERT_UNUSED_VALUE, the library will not send this field to nRF Cloud.
[in]descriptionOptional text describing the alert.
Returns
0 if alert is successfully sent, otherwise, a negative error number.