Start here
Docmost API Python preview
Unofficial Octri preview. Built from Docmost's public OpenAPI 3.1 document, version 1.1.0, downloaded through its public API viewer. Four POST-based read operations: list spaces, list sidebar pages, retrieve page, and list recent pages.
Install and call
Download generated Python SDK v1.1.0. Unzip, then install locally with pip. This ZIP has not been published to PyPI.
Create a Docmost API key and pass it as a bearer token. Set base_url to your own Docmost instance, ending in /api. Code below uses package methods verified against downloaded ZIP.
import os
from docmost_octri_preview_sdk import ClientAuthConfig, ClientConfig, Docmost
from docmost_octri_preview_sdk.types import SidebarPageDto
client = Docmost(ClientConfig(
base_url="https://your-docmost-instance.example/api",
auth=ClientAuthConfig(bearer_auth=os.environ["DOCMOST_API_KEY"]),
))
spaces = client.spaces.get_workspace(limit=20)
if spaces.data.meta.has_next_page:
more = client.spaces.get_workspace(limit=20, cursor=spaces.data.meta.next_cursor)
pages = client.pages.get_sidebar(SidebarPageDto(space_id="your-space-uuid"))
page = client.pages.get(page_id="your-page-id")Responses use data.items and data.meta for lists. Cursors are opaque: pass them unchanged. These methods use POST even for reads.
Tested scope and limitation
Downloaded Python SDK installed and passed synthetic local HTTP mock: bearer auth, custom instance URL, POST bodies, space cursor follow-up, nested list envelopes, page retrieval, typed 404. No live Docmost instance was used. Generator omitted pagination fields from page-list request models where source uses allOf; this preview demonstrates cursor paging on spaces only. Semantically equivalent flattened demo spec prepared, but Octri refresh failed at ai-generate and rebuild; corrected package has not been published. No automatic synchronization claimed.