Set desired configuration of the device
You can manage the device's configuration via its device shadow. This is the online representation of the device which contains its last known reported state and the configuration to be sent to the device, referred to respectively as reported and desired shadows.
When devices ingest data to the HERE Tracking API, the response returned is a JSON object containing the desired shadow.
Set desired configuration
To set configuration on a device and save the values to the device shadow, use the shadows endpoint. Whenever you set a new device configuration, the stateVersion property of the device shadow is incremented. The next time the device ingests data into the API, it will receive a configuration in form of the desired shadow along with the new stateVersion.
The trackingId is a Tracking ID of a virtual device claimed by the user.
curl -X PUT \
https://{tcHost}/shadows/v2/{trackingId} \
-H 'authorization: Bearer {userToken}' \
-H 'content-type: application/json' \
-d '{
"desired": {
"payload": {
"led": "red"
}
}
}'Updated last month