v1
latestOpenAPI 3.0.12026-07-17265663.1 KBResources
Get all resources
The plgd hub builds an up to date Twin for each published resource. This API allows you to retrieve shadow contents of all resources published by all device. Response is sent in form of a stream, chunk by chunk. Error response might be returned immediately, but also anytime during the stream reading. If you specify a resourceIdFilter that also contains an etag, then the response for an unmodified resource will include data.status = NOT_MODIFIED without data.content.data.
get/api/v1/resources
Query parameters
deviceIdstring uuid
Filter by the device id.
typestring[]
Filter by the type.
resourceIdstring[]
Filter by resource id specified in format {deviceId}{resourceHref}(?etag={etag}). ETag is optional and it is supported only for GET resources.
Response
Stream of resource shadow contents or errors.
Example response
{
"result": {
"types": [
"oic.r.switch.binary"
],
"data": {
"resourceId": {
"href": "/switches/1",
"deviceId": "4629b3cb-3a6e-477c-5d50-ccb28ad7c349"
},
"content": {
"rt": [
"oic.r.switch.binary"
],
"if": [
"oic.if.a",
"oic.if.baseline"
],
"value": false
},
"auditContext": {
"userId": "9772fcff-dcfb-4db8-a6c9-1b75f2165eb1",
"correlationId": "e20f1eef-2eeb-4755-b33e-139106d28e2c"
},
"eventMetadata": {
"connectionId": "194.1.25.111:61692",
"sequence": "7",
"version": "0",
"timestamp": "1625427236429144178"
},
"status": "OK"
}
}
}