Submits a device state report so Esper can detect blueprint drift.
Accepts a sparse report of device settings that have changed and records it against the device. Esper compares these reports with the device's assigned blueprint to detect drift. Returns 201 on success.
About Device State Reports Blueprint drift happens when a device's actual settings no longer match its assigned blueprint. Device state reports feed that comparison. Drift results are available from the Blueprint Drift endpoints, such as GET /v2/blueprint-drift/{deviceId}/status.
Key Fields / Query Parameters
id— UUID of the device (path parameter)device_settings— Object containing only the settings keys that changed (required)event_ts— Time of the change, in milliseconds since the Unix epoch
Common Use Cases
- Reporting setting changes that feed blueprint drift detection
Best Practices
- Send only changed keys in
device_settings, not the full settings object - Include
event_tsso reports can be ordered correctly
Workflow
- Collect the settings that changed on the device
- Call this endpoint with
device_settingsandevent_ts - Check drift results with the Blueprint Drift endpoints
Security
device_apiKey
- Mock serverhttps://develop-api.esper.io/_mock/openapi/v2/devices/{id}/devicestate
- https://develop-api.esper.cloud/apihttps://develop-api.esper.cloud/api/v2/devices/{id}/devicestate
curl -i -X PUT \
'https://develop-api.esper.io/_mock/openapi/v2/devices/{id}/devicestate' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"event_ts": 0,
"device_settings": {}
}'