Skip to main content

Update the State of an nRF9x Device

PATCH 

/v1/organizations/:organization_slug/projects/:project_slug/long-range/devices/:device_id/state

Different API host

Send this request to https://api.nrfcloud.com, not the default Memfault API host.

Update the desired and/or reported state of a single nRF9x Device in a given Project. The patch is merged into the existing state, and a key set to null is deleted.

Requires an Organization Auth Token with the device:write permission.

Each side of the patch is validated against the device state constraints below. Paths not listed are not constrained. All violations are reported in a single 422 response and the state is left untouched.

PathdesiredreportedValue type
pairingRead-onlyRead-onlyAny
nrfcloud_mqtt_topic_prefixRead-onlyRead-onlyAny
connectionRead-onlyRead-onlyAny
deviceRead-onlyWritableAny
control.alertsEnWritableWritableBoolean
control.logLvlWritableWritableInteger

Read-only paths are owned by the platform and are rejected unless force=true is set. The value type is always checked, including with force=true. Setting a typed path to null deletes it and is accepted.

Request​

Responses​

Accepted