---
title: "Get resource links"
method: GET
path: "/api/v1/resource-links"
tags: ["Resource Links"]
---

# Get resource links

`GET /api/v1/resource-links`

Each device publishes links to its resources to the plgd hub. Authorized user can get all published links in form of a stream, chunk by chunk. Attach your reader and consume link by link. Various filters allows you to be more concrete in links you would like to get. Error response might be returned immediately, but also anytime during the stream reading.

## Query parameters

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

## Response `200`

Stream of resource links or errors.

- object
  - `result` ResourceLinks
    - `resources` ResourceLink[]
      - `href` string
      - `deviceId` string
      - `resourceTypes` string[]
      - `interfaces` string[]
      - `anchor` string
      - `title` string
      - `supportedContentTypes` string[]
      - `validUntil` string, int64
      - `policy` object
        - `bitFlags` integer
      - `endpointInformations` object[]
        - `endpoint` string
        - `priority` string, int64
    - `deviceId` string
    - `auditContext` AuditContext
      - `userId` string
      - `correlationId` string
    - `eventMetadata` EventMetadata
      - `version` string, uint64
      - `timestamp` string, int64
      - `connectionId` string
      - `sequence` string, uint64
  - `error` Error
    - `code` integer
    - `message` string
    - `details` object[]
      - `typeUrl` string
      - `value` string, byte

## Other responses

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

## Changes

> 42 revisions in range; 3 not diffed.

- **2022-01-05** `afc9b9af73b5` — 6 info
  - added the optional property `error/details/items/typeUrl` to the response with the `200` status
  - added the optional property `error/details/items/typeUrl` to the response with the `400` status
  - added the optional property `error/details/items/typeUrl` to the response with the `401` status
  - added the optional property `error/details/items/value` to the response with the `200` status
  - …2 more
- **2021-10-01** `4508be528e8a` — 1 warning, 1 info
  - removed the optional property `result/resources/items/policies` from the response with the `200` status
  - added the optional property `result/resources/items/policy` to the response with the `200` status
- **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/resource-links/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/bbfd9fa43407/schema)
