Searching:
0 results foundDevices/UpdateSettings
POST /odata/Devices/deviceId/updateSettings
Description
Axonize Device objects have a property named settings. Each setting property in settings correlates with a specific setting on the actual Device, which is managed by the Axonize Device SDK.
This endpoint enables the updating of a setting value of an Axonize Device object property so that this same value is modified on a physical Device in order to affect its functionality.
The Axonize Device SDK on the Device must be set up to monitor this property in order to trigger the proper functionality on the Device.
See the following for request and response details ‒
See Also
Request ‒ Devices/UpdateSettings
Property | Type | Description |
Mandatory |
settings | Array of Objects | Settings is an array of setting properties. Each setting property represents an Axonize Device object property to be modified on a physical Device in order to affect its functionality.
“settings”: [ { “name”: “string”, “desiredValue”: “string”, “reportedValue”: “string”, “lastSync”: “2018-08-24T11:14:32.000Z”, “version”: 0 } |
|
settings/name | String | A free-text name for the property. This name must be recognized and handled on the physical Device. | |
settings/desiredValue | String | The value to be assigned to this property on the physical Device. | |
settings/reportedValue | String | The value received from the updated physical Device by the Axonize Device SDK as the updatedValue, after it has been updated. This value should be the same as the desiredValue (described above). | |
settings/lastSync | DateTime | The last timestamp when a reading was received from the Device. | |
settings/version | Integer | Not in use. |
Example JSON Devices/UpdateSettings Request
curl -X POST \
https://api.dev.axonize.com/odata/devices/5953a14cb637f914dcbf75fd/updatesettings \
-H ‘Content-Type: application/json’ \
-H ‘appId: 2925e8b9-259c-1234-afed-80a20d123456’ \
-H ‘Authorization: Token’ \
-d ‘{
“settings”: [
{
“name”: “temperature”,
“reportedValue”: “40”,
“lastSync”: “2018-08-19T12:50:03.363Z”,
“version”: 0
}
]
}’
Response ‒ Devices/UpdateSettings
Property | Type | Description |
value | Boolean | The result of the update settings. |
Example JSON Devices/UpdateSettings Response
Status 200 – OK
{
“@odata.context”: “https://dev-axonizeapi-axonize.dev-ase-axonize.p.azurewebsites.net/odata/$metadata#Edm.Boolean”,
“value”: true
}
{
“setting”: {
“name”: “string”,
“desiredValue”: “string”,
“reportedValue”: “string”,
“lastSync”: “2018-08-24T11:14:32.081Z”,
“version”: 0
}