Configuration through REST API

Asset Tracker Template

tags
Asset Tracker Template

You can update these parameters using nRF Cloud REST API.

Example 1:

curl -X PATCH "https://api.nrfcloud.com/v1/devices/$DEVICE_ID/state" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
    -d '{ "desired": { "config": { "sample_interval": 300, "storage_threshold": 1 } } }'

Example 2:

curl -X PATCH "https://api.nrfcloud.com/v1/devices/$DEVICE_ID/state" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
    -d '{ "desired": { "config": { "sample_interval": 600, "storage_threshold": 6 } } }'