Document Sessions
Operations of the Knowledge Base API. Paths are relative to your deployment's API host.
POST /api/knowledge-base-api/document-sessions
Create a new document page in a space and open its authoring session in one call. Returns the bound page (with sessionId populated) and the sessionId.
Authentication: bearer token (Authorization: Bearer <token>)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
idempotency-key | header | string | yes | Opaque client-chosen key. Opening the same document session twice with the same key returns the first session rather than creating a second page. |
Request body: application/json OpenDocumentSessionDto
| Status | Description | Body |
|---|---|---|
| 201 | application/json OpenDocumentSessionResponseDtoDataEnvelope | |
| 400 | application/problem+json ProblemDetailsDto | |
| 401 | application/problem+json ProblemDetailsDto | |
| 403 | application/problem+json ProblemDetailsDto | |
| 404 | application/problem+json ProblemDetailsDto | |
| 409 | application/problem+json ProblemDetailsDto | |
| 422 | application/problem+json ProblemDetailsDto | |
| 500 | application/problem+json ProblemDetailsDto |
POST /api/knowledge-base-api/document-sessions/{pageId}/session
Resolve the live authoring session for an EXISTING document page, adopting the one already bound or minting a fresh one when it is terminal or gone. Idempotent: safe to call on every open.
Authentication: bearer token (Authorization: Bearer <token>)
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
pageId | path | string | yes | |
idempotency-key | header | string | yes | Opaque client-chosen key; the same key resolves the same session. |
Request body: application/json EnsureDocumentSessionDto
| Status | Description | Body |
|---|---|---|
| 201 | application/json EnsureDocumentSessionResponseDtoDataEnvelope | |
| 400 | application/problem+json ProblemDetailsDto | |
| 401 | application/problem+json ProblemDetailsDto | |
| 403 | application/problem+json ProblemDetailsDto | |
| 404 | application/problem+json ProblemDetailsDto | |
| 409 | application/problem+json ProblemDetailsDto | |
| 422 | application/problem+json ProblemDetailsDto | |
| 500 | application/problem+json ProblemDetailsDto |