IP Devices
UpdateDeviceState
Modify the device's state as stored in its shadow. You do not have to pass the entire shadow. You can update a specific portion by setting the correct JSON field path:
export DEVICE_VERSION=$(curl $API_HOST/v1/devices/$DEVICE_ID -H "Authorization: Bearer $API_KEY" | jq -r '.["$meta"].version')
curl -X PATCH $API_HOST/v1/devices/$DEVICE_ID/state -d '{ "reported": { "device": { "serviceInfo": { "fota_v1": ["BOOT"] } } } }' -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" -H "If-Match: $DEVICE_VERSION"
patch/devices/{deviceId}/state
Path parameters
deviceIdstring required
This is the canonical device id used in the device certificate, and as the MQTT client id.
Example:nrf-1234567890123456789000
Request body
Example request
{
"reported": {
"device": {
"serviceInfo": {
"fota_v1": [
"APP",
"MODEM"
]
}
}
},
"desired": {
"someField1": {
"someField2": "someValue2"
}
}
}Changes
No recorded changes to this endpoint across all 1 revision of this API.