---
title: "Get all resources"
method: GET
path: "/api/v1/resources"
tags: ["Resources"]
---

# Get all resources

`GET /api/v1/resources`

The plgd cloud builds an up to date [Shadow](https%3A%2F%2Fplgd.dev%2Ffeatures%2Fdevice-shadow%2F) 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.

## Query parameters

- `deviceId` string, uuid
- `type` string[]
- `resourceId` string[]

## Response `200`

Stream of resource shadow contents or errors.

- object
  - `result` object
    - `types` string[]
    - `data` Resource
      - `resourceId` ResourceId
        - `deviceId` string, uuid
        - `href` string, url
      - `content` union
        - ResourceContent
        - ResourceCreatedContent
          - `href` string, uri
          - `rt` string[]
          - `if` string[]
          - `rep` object — Resource content provided as JSON object or base64 encoded CBOR.
      - `auditContext` AuditContext
        - `userId` string
        - `correlationId` string
      - `eventMetadata` EventMetadata
        - `version` string, uint64
        - `timestamp` string, int64
        - `connectionId` string
        - `sequence` string, uint64
      - `status` 'UNKNOWN' | 'OK' | 'BAD_REQUEST' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'NOT_FOUND' | 'UNAVAILABLE' | 'NOT_IMPLEMENTED' | 'ACCEPTED' | 'ERROR' | 'METHOD_NOT_ALLOWED' | 'CREATED'
  - `error` Error
    - `code` integer
    - `message` string
    - `details` object[]

## Other responses

- `400` — Bad Request
- `401` — Not authorized

## Changes

> 24 revisions in range; 3 not diffed.

- **2021-07-27** `4d121732b593` — 1 info
  - endpoint added
- **2020-04-11** `562192db9767` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/plgd-dev/apis/plgd-http-gateway/changes/api/v1/resources/get.md)

---

[API](https://skmtc.dev/plgd-dev/apis/plgd-http-gateway.md) · [All operations](https://skmtc.dev/plgd-dev/apis/plgd-http-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/plgd-dev/plgd-http-gateway/revisions/4508be528e8a/schema)
