v1

latestOpenAPI 3.0.12026-07-17265663.1 KB
Resources

Update a resource

Resource update request is send directly to the device, carrying values which should be modified. Update confirmation doesn't have to carry updated content, this is up to the device implementation if it replies with an up to date values. If subscribed to the websocket, after the update command is successfully accepted by the device, event RESOURCE_UPDATED with matching correlationId is emitted. At the moment values are applied / changed on the device (e.g. resource update might trigger some processing, which was successfully requested but operation is in progress) event RESOURCE_CHANGED is emitted and resource shadow updated.

put/api/v1/devices/{deviceId}/resources/{resourceHref}

Query parameters

interfacestring

Defines the view or a way how to interact with a resource.

timeToLiveinteger

Command expiration in nanoseconds. 0 means forever and 100ms is minimal value.

onlyContentboolean

Return only content of the resource in the response.

Request body

ResourceContent required

Example request

{
  "value": true
}

Response

Confirmation of an update. Presence of the content in the response depends on the device implementation.

ResourceContent required

Example response

{
  "value": true
}