---
title: "Get session by ID"
method: GET
path: "/api/sessions/{sessionId}"
tags: ["Sessions"]
---

# Get session by ID

`GET /api/sessions/{sessionId}`

Returns full session details including all messages. Only the session owner (same user + org) can access it.

## Path parameters

- `sessionId` string, required

## Headers

- `X-Grafana-Org-Id` string

## Response `200`

Session details

- ChatSession — Chat session with full message history
  - `id` string, required — Session ID (base64 URL-safe 32-byte token)
  - `title` string, required — Session title
  - `messages` SessionMessage[], required — All messages in the session
    - `role` 'user' | 'assistant', required — Message role
    - `content` string, required — Message text content
    - `toolCalls` object, nullable — Tool calls made (raw JSON)
    - `pageRefs` object, nullable — Page references (raw JSON)
  - `summary` string — Session summary
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `messageCount` integer, required — Total number of messages
  - `activeRunId` string — ID of currently active agent run (if any)
  - `model` 'base' | 'large' — LLM app model abstraction locked to this session, if selected

## Other responses

- `400` — Bad request (invalid parameters or malformed request body)
- `401` — Unauthorized (missing or invalid authentication)
- `404` — Resource not found
- `500` — Internal server error

---

[API](https://skmtc.net/consensys/apis/ask-o11y-ai-powered-observability-assistant-api.md) · [All operations](https://skmtc.net/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/consensys/ask-o11y-ai-powered-observability-assistant-api/versions/3ccc03eccaef/schema)
