From 5a2da6528fb6f68982618f3fc7113f1c75d5d966 Mon Sep 17 00:00:00 2001 From: Sweets Sweetman Date: Mon, 4 May 2026 18:37:22 -0500 Subject: [PATCH] docs(sessions): add GET /api/sessions/{sessionId} reference Restored after rebasing on main, which absorbed the nav restructure and Error-schema changes that previously also lived in this branch. Net diff vs main is now scoped to just the GET endpoint: - New `api-reference/sessions/get.mdx` - Adds `/api/sessions/{sessionId}` GET path + `GetSessionResponse` schema to `api-reference/openapi/sessions.json` - Adds `api-reference/sessions/get` to the Sessions nav group Co-Authored-By: Claude Opus 4.7 (1M context) --- api-reference/openapi/sessions.json | 70 +++++++++++++++++++++++++++++ api-reference/sessions/get.mdx | 4 ++ docs.json | 3 +- 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 api-reference/sessions/get.mdx diff --git a/api-reference/openapi/sessions.json b/api-reference/openapi/sessions.json index 7472ee2..350f8f8 100644 --- a/api-reference/openapi/sessions.json +++ b/api-reference/openapi/sessions.json @@ -79,6 +79,65 @@ } } } + }, + "/api/sessions/{sessionId}": { + "get": { + "summary": "Get session by id", + "description": "Returns a single agent session by its id.", + "parameters": [ + { + "name": "sessionId", + "in": "path", + "required": true, + "description": "The id of the session to fetch.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Session retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSessionResponse" + } + } + } + }, + "401": { + "description": "Unauthorized - invalid or missing API key / Bearer token", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "403": { + "description": "Forbidden - the authenticated account does not own this session", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found - no session exists with the given id", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + } + } } }, "components": { @@ -131,6 +190,17 @@ } } }, + "GetSessionResponse": { + "type": "object", + "required": [ + "session" + ], + "properties": { + "session": { + "$ref": "#/components/schemas/Session" + } + } + }, "CreateSessionResponse": { "type": "object", "required": [ diff --git a/api-reference/sessions/get.mdx b/api-reference/sessions/get.mdx new file mode 100644 index 0000000..483ac1b --- /dev/null +++ b/api-reference/sessions/get.mdx @@ -0,0 +1,4 @@ +--- +title: "Get Session" +openapi: "/api-reference/openapi/sessions.json GET /api/sessions/{sessionId}" +--- diff --git a/docs.json b/docs.json index 57c9737..147ee00 100644 --- a/docs.json +++ b/docs.json @@ -268,7 +268,8 @@ { "group": "Sessions", "pages": [ - "api-reference/sessions/create" + "api-reference/sessions/create", + "api-reference/sessions/get" ] } ]