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

◆ nrf_cloud_rest_shadow_transform_request()

int nrf_cloud_rest_shadow_transform_request ( struct nrf_cloud_rest_context *const  rest_ctx,
const char *const  device_id,
char const *const  transform 
)

#include <include/net/nrf_cloud_rest.h>

Request shadow data using a JSONata expression. For example, to request the reported device info section, the transform would be: "state.reported.device.deviceInfo".

Note
Consider the size of the response data when making shadow requests so that it does not exceed rx_buf_len in nrf_cloud_rest_context.
Parameters
[in,out]rest_ctxContext for communicating with nRF Cloud's REST API.
[in]device_idNull-terminated, unique device ID registered with nRF Cloud.
transformThe JSONata expression.
Return values
0If successful. Otherwise, a (negative) error code is returned. See
embed:rst:inline :ref:`nrf_cloud_rest_failure` 
for details.