---
title: "List links"
method: GET
path: "/links"
tags: ["Link"]
---

# List links

`GET /links`

## Request

- Base URL: `https://demo.ziti.dev/fabric/v1`
- URL: `https://demo.ziti.dev/fabric/v1/links`
- Auth: one of:
  - API key in header `zt-session`
  - OAuth 2
    - Authorization code: `/oidc/authorize`
    - Token URL: `/oidc/token` scopes: `openid`
- TypeScript: <https://skmtc.dev/openziti/apis/ziti-fabric/docs/links/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves a list of link resources; does not supports filtering, sorting, or pagination. Requires admin access.

## Query parameters

- `limit` integer
- `offset` integer
- `filter` string

## Response `200`

A list of links

- ListLinksEnvelope
  - `meta` Meta, required
    - `filterableFields` string[]
    - `pagination` Pagination
      - `limit` number, required
      - `offset` number, required
      - `totalCount` number, required
    - `apiEnrollmentVersion` string
    - `apiVersion` string
  - `data` LinkDetail[], required
    - `id` string, required
    - `protocol` string, required
    - `sourceRouter` EntityRef, required: A reference to another resource and links to interact with it
      - `entity` string
      - `id` string
      - `name` string
      - `_links` Links: A map of named links
    - `destRouter` EntityRef, required: A reference to another resource and links to interact with it
      - `entity` string
      - `id` string
      - `name` string
      - `_links` Links: A map of named links
    - `state` string, required
    - `down` boolean, required
    - `staticCost` integer, required
    - `sourceLatency` integer, required
    - `destLatency` integer, required
    - `cost` integer, required
    - `iteration` integer, required
    - `connections` LinkConnection[]
      - `type` string
      - `source` string
      - `dest` string

## Other responses

- `401`: The currently supplied session does not have the correct access rights to request this resource
- `429`: The resource requested is rate limited and the rate limit has been exceeded

## Changes

- **2023-12-05** `76a1c254d649`: 3 info
  - added the new optional `query` request parameter `filter`
  - added the new optional `query` request parameter `limit`
  - added the new optional `query` request parameter `offset`
- **2023-10-23** `61384eb76c21`: 1 info
  - added the non-success response with the status `429`
- **2023-08-16** `94130b45fa7e`: 3 warning, 1 info
  - deleted the `query` request parameter `filter`
  - deleted the `query` request parameter `limit`
  - deleted the `query` request parameter `offset`
  - removed the non-success response with the status `429`

[Operation history](https://skmtc.dev/openziti/apis/ziti-fabric/changes/links/get.md)

---

[API](https://skmtc.dev/openziti/apis/ziti-fabric.md) - [All operations](https://skmtc.dev/openziti/apis/ziti-fabric/llms.txt) - [OpenAPI document](https://skmtc.dev/openziti/apis/ziti-fabric/revisions/b899875c8f57?raw)
