Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions api-reference/openapi/sessions.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -131,6 +190,17 @@
}
}
},
"GetSessionResponse": {
"type": "object",
"required": [
"session"
],
"properties": {
"session": {
"$ref": "#/components/schemas/Session"
}
}
},
"CreateSessionResponse": {
"type": "object",
"required": [
Expand Down
4 changes: 4 additions & 0 deletions api-reference/sessions/get.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: "Get Session"
openapi: "/api-reference/openapi/sessions.json GET /api/sessions/{sessionId}"
Comment on lines +2 to +3
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a description field and verify the openapi reference format against the project guideline.

The openapi value "/api-reference/openapi/sessions.json GET /api/sessions/{sessionId}" matches the Mintlify format for MDX pages that reference a specific local spec file, and is technically correct. However, the coding guideline for api-reference/**/*.mdx specifies the format as openapi: 'METHOD /path' (i.e., without a file-path prefix), which implies global spec registration via docs.json. Since docs.json has no global openapi entry, the per-file format is the working approach — but the guideline should be updated to match, or the spec registered globally.

Additionally, the page is missing a description frontmatter field. As per coding guidelines, **/*.mdx files should "Use clear, self-documenting titles and descriptions in documentation."

📝 Proposed fix
 ---
 title: "Get Session"
+description: "Retrieve a single agent session by its ID."
 openapi: "/api-reference/openapi/sessions.json GET /api/sessions/{sessionId}"
 ---
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
title: "Get Session"
openapi: "/api-reference/openapi/sessions.json GET /api/sessions/{sessionId}"
---
title: "Get Session"
description: "Retrieve a single agent session by its ID."
openapi: "/api-reference/openapi/sessions.json GET /api/sessions/{sessionId}"
---
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@api-reference/sessions/get.mdx` around lines 2 - 3, Add a missing frontmatter
description and ensure the openapi frontmatter matches project guideline: update
the frontmatter in the Get Session page by adding a descriptive `description`
field (e.g., "Retrieve a session by ID") and either change the `openapi` value
from "/api-reference/openapi/sessions.json GET /api/sessions/{sessionId}" to the
guideline format "GET /api/sessions/{sessionId}" (if global spec registration
will be used) or keep the current file-scoped form but document/register the
spec globally in docs.json; modify the frontmatter keys `title` and `openapi`
accordingly to reflect this fix.

---
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@
{
"group": "Sessions",
"pages": [
"api-reference/sessions/create"
"api-reference/sessions/create",
"api-reference/sessions/get"
]
}
]
Expand Down