docs: update API reference for stop session endpoint - #689
Merged
Conversation
Add the Stop Session endpoint to both the hosted and self-hosted
OpenAPI specs and to the API reference navigation. This route was
newly wired onto the public API session router (previously it only
existed on the internal session router) in monorepo release v0.2.820.
Source: tembo/monorepo apps/api/src/server/routes/session/stop.ts,
mounted via apps/api/src/server/routes/public-api/session.ts
(`userSession.route('/', stopSessionRouter)`) and
apps/api/src/server/routes/public-api/index.ts
(`router.route('/public-api/session', session)`).
tembo
Bot
requested review from
Coleary005,
DarrenBaldwin07,
benja and
vrmiguel
as code owners
August 12, 2026 13:07
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Contributor
Author
|
Requesting review from @DarrenBaldwin07 who has experience with the following files modified in this PR:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Documents the
POST /session/{sessionId}/stopendpoint in the API reference:openapi.documented.yml(hosted API) andopenapi.self-hosted.yml(self-hosted API), matching the existing style/schema conventions used by neighboring/session/*endpoints.POST /session/{sessionId}/stopto the "Sessions" navigation group indocs.jsonfor both the "Tembo API" and "Self-Hosted API" tabs.No other content was touched.
Why
In monorepo release
v0.2.820, the session-stop route was refactored out of the internal session router into a sharedstopSessionRouterand mounted directly on the public API session router for the first time:apps/api/src/server/routes/session/stop.ts(new file) — definesPOST /:id/stop, tagged['session', 'public-api'], returning{ cancelledSessions, cancelledJobs, stoppedRuntimeSessions, interruptedRuntimeTurns, cancelledRuntimeTurns }(all numbers), with400/404error responses.apps/api/src/server/routes/public-api/session.ts— now doesuserSession.route('/', stopSessionRouter), which it did not do before this release.apps/api/src/server/routes/public-api/index.tsmounts that router at/public-api/session, andcompatibility.tsrewrites public-facing/session/...requests to/public-api/session/..., matching the path convention already used for/session/create,/session/list,/session/search, and/session/{sessionId}/messagesin the docs.Before this release, "stop" only existed on the internal (non-public) session router, so it was correctly absent from the public API reference. Now that it's part of the public API surface, the reference docs and self-hosted equivalent were missing this endpoint and the nav had no entry for it.
Evidence
0d21df997(tagv0.2.820), diffed against the previously-processed releasev0.2.819.apps/api/src/server/routes/session/stop.ts(new): route definition, response schema, tags.apps/api/src/server/routes/public-api/session.ts: addsuserSession.route('/', stopSessionRouter)(previously absent).apps/api/src/server/routes/session/index.ts: removes the old inlinehandleStopSession//:id/stopregistration in favor of the shared router (pure refactor on the internal side, but a net-new capability on the public-api side).apps/api/tests/server/publicApiSessionStop.test.ts(new test file added in the same release) exercises this route.Confidence
High confidence: this is an exact, mechanical addition of a route, method, path parameter, and response schema that can be read directly off the shipped code and its accompanying test — no guessing about wording, positioning, or intent. The new entry mirrors the existing
/session/{sessionId}/messagesentry's structure and the file's established conventions (indentation,operationIdnaming, error schema shape, self-hosted URL pattern), so no style drift is introduced. I intentionally did not add a JS SDK code sample for this endpoint since the@tembo-io/sdkpackage lives outside this repo and I have no evidence of its method name for this route — only the verified cURL/REST contract is documented.cc @benja
Note
Low Risk
Documentation-only OpenAPI and nav updates with no runtime or security impact.
Overview
Documents the new public
POST /session/{sessionId}/stopendpoint in both the hosted and self-hosted API references.Adds the OpenAPI operation (response schema,
400/404errors, and cURL sample) toopenapi.documented.ymlandopenapi.self-hosted.yml, and lists it under the Sessions nav group indocs.jsonfor both API tabs.Reviewed by Cursor Bugbot for commit 4165983. Bugbot is set up for automated code reviews on this repo. Configure here.