---
title: "Retrieves a single session"
method: GET
path: "/sessions/{id}"
tags: ["Session"]
---

# Retrieves a single session

`GET /sessions/{id}`

## Request

- Base URL: `https://demo.ziti.dev/edge/client/v1`
- URL: `https://demo.ziti.dev/edge/client/v1/sessions/{id}`
- 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-edge-client/docs/sessions/:id/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves a single session by id.

## Path parameters

- `id` string, required

## Response `200`

A single session

- DetailSessionEnvelope
  - `data` SessionDetail, required: Fields shared by all Edge API entities
    - `_links` object, required: A map of named links
    - `createdAt` string, date-time, required
    - `id` string, required
    - `tags` Tags
    - `updatedAt` string, date-time, required
    - `apiSession` EntityRef, required: A reference to another resource and links to interact with it
      - `_links` object: A map of named links
      - `entity` string
      - `id` string
      - `name` string
    - `apiSessionId` string, required
    - `edgeRouters` SessionEdgeRouter[], required
      - `appData` Tags
      - `capabilities` string[]: Capabilities this edge router advertises, used by SDK clients to select a router that supports a given feature before connecting. Open-ended: clients ignore values they do not recognize. Absent when the controller predates this field.
      - `cost` integer, nullable, required
      - `disabled` boolean, required
      - `hostname` string, required
      - `isOnline` boolean, required
      - `name` string, required
      - `noTraversal` boolean, nullable, required
      - `supportedProtocols` object, required
      - `syncStatus` string, required
      - `version` string: The version of the edge router binary, as reported to the controller when the router connects. Empty when the controller has not yet received a version from the router or predates this field.
      - `urls` object, required
    - `identityId` string, required
    - `service` EntityRef, required: A reference to another resource and links to interact with it
      - `_links` object: A map of named links
      - `entity` string
      - `id` string
      - `name` string
    - `serviceId` string, required
    - `token` string, required
    - `type` 'Dial' | 'Bind' | 'Invalid', required
  - `meta` Meta, required
    - `apiEnrollmentVersion` string
    - `apiVersion` string
    - `filterableFields` string[]
    - `pagination` Pagination
      - `limit` number, required
      - `offset` number, required
      - `totalCount` number, required

## Other responses

- `401`: The supplied session does not have the correct access rights to request this resource
- `404`: The requested resource does not exist

## Changes

- **2026-10-14** `f7b51eaafbbb`: 2 breaking, 2 info
  - the response property `data/allOf[#/components/schemas/baseEntity]/tags` became nullable for the status `200`
  - the response property `data/allOf[subschema #2]/edgeRouters/items/allOf[#/components/schemas/commonEdgeRouterProperties]/appData` became nullable for the status `200`
  - added the optional property `data/allOf[subschema #2]/edgeRouters/items/allOf[#/components/schemas/commonEdgeRouterProperties]/capabilities` to the response with the `200` status
  - added the optional property `data/allOf[subschema #2]/edgeRouters/items/allOf[#/components/schemas/commonEdgeRouterProperties]/version` to the response with the `200` status
- **2024-05-29** `cce2800c1357`: 3 warning
  - the optional response header `WWW-Authenticate` removed for the status `200`
  - the optional response header `WWW-Authenticate` removed for the status `401`
  - the optional response header `WWW-Authenticate` removed for the status `404`

[Operation history](https://skmtc.dev/openziti/apis/ziti-edge-client/changes/sessions/:id/get.md)

---

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