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" ] } ]