Resources

Get all resources

The plgd cloud builds an up to date Shadow 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.

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}

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"
    }
  }
}

Changes