Skip to content
GitmoapAPIBeta
Knowledgewiki
GET/repositories/{repo_id}/wiki/pages/{path}/revisions/{sha}

Read a wiki page as it was at a commit

get_repo_wiki_page_revision
  • wiki:read
    A token needs the wiki:read scope: Read wiki pages, their history and their backlinksGranted by mcp_agent, mcp_agent_write, read_api, write_api.Every operation this scope unlocks
  • Metered egress · in band body

    x-gitmoap-egress: {"kind":"metered","arg":"in_band_body"}

  • Cacheable · immutable SHA

    x-gitmoap-cache: {"kind":"immutable_sha"}

Answers the page's content at that commit, addressed by the page's current path. The response can be cached indefinitely, because a commit never changes; it carries no table of contents. Anyone who can see the repository may read its wiki; on a public repository that includes callers who are not signed in.

Parameters

Path
  • repo_idRepositoryId (string · uuid)Repository ID
  • pathWikiPagePath (string)URL-encoded wiki page path
  • shastringThe commit to read the page at

Responses

200The page as it was at that commitapplication/json
  • contentstringThe markup, read from git at the wiki's head.
  • created_atstring
  • doc_idstringStable identity. Unchanged by a rename, which is what lets every backlink survive one.
  • formatWikiFormatmarkdownasciidocrstorgtextilemediawikiThe markup a page is written in, decided by its file extension.
  • pathWikiPagePath (string)
  • titleWikiPageTitle (string)
  • tocarray of WikiHeadingFrom spec_blocks. Empty until the projection has caught up, which is a different thing from the page having no headings and is why the page itself is never sourced from there.
    • The WikiHeading schema
    • anchorstringThe GitHub-compatible slug, which is what a link into the page uses.
    • headingstring
    • levelinteger · int32
    • ordinalinteger · int32
    • parent_ordinalinteger · int32 or nulloptionalThe enclosing heading's ordinal, so a client can rebuild the tree without a second read.
  • updated_atstring
  • wiki_idWikiId (string · uuid)
  • wiki_page_idWikiPageId (string · uuid)
  • commitWikiRevision or nulloptional
  • created_byActorSummary or nulloptional
  • head_shaCommitHash (string) or nulloptionalThe commit the content was read at — the ETag validator. The commit and not the blob, because a wiki save's precondition is the wiki's head (expected_head_sha), and the validator a reader holds is the one a later save presents. Weaker than a per-page validator (any edit anywhere in the wiki moves it) and honest, which is the trade worth making for a cache tag.
  • redirected_fromWikiPagePath (string) or nulloptionalSet when a redirect resolved this request, so the client can update its address bar and say this page moved rather than silently showing something else.
200 exampleSynthesized example
{
"content": "content-72a2",
"created_at": "2026-10-16T13:12:10Z",
"doc_id": "06d0ccc7-a8a8-45ec-9404-cf9d403d713e",
"format": "markdown",
"path": "path-1f0f",
"title": "Inline scalar newtypes but keep their brand",
"toc": [
{
"anchor": "anchor-1758",
"heading": "heading-3eb6",
"level": 9,
"ordinal": 46
}
],
"updated_at": "2026-10-16T14:06:11Z",
"wiki_id": "032a6c1d-b114-4c31-b304-d00a073a5ef0",
"wiki_page_id": "c4760ef3-bdde-439a-a0bf-336983286a5e",
"commit": {
"author_name": "Mara Okafor",
"committed_at": "2026-10-12T04:22:17Z",
"message": "Stream pipeline status into the run header",
"sha": "7efc6cb4cdb02b1974832a3cfe455700bb9a9b30",
"author": {
"email": "mara@acme.example",
"id": "id-efcb",
"username": "tomas",
"avatar_url": "https://gitmoap.example/acme/50388931"
}
},
"created_by": {
"email": "mara@acme.example",
"id": "id-471d",
"username": "tomas",
"avatar_url": "https://gitmoap.example/acme/497d4849"
},
"head_sha": "021d3272e39a3e4b403921be46ff8726451e69e2",
"redirected_from": "redirected-from-fdc0"
}
400Bad request — a path parameter is not a well-formed value of its typeapplication/json
Error codes
  • BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-a0a1",
"message": "Draw the region map from operation density"
}
}
401Unauthenticated — no credential, or an invalid oneapplication/json
Error codes
  • UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-7829",
"message": "Inline scalar newtypes but keep their brand"
}
}
403Forbidden — the caller's access level or token scope is insufficientapplication/json
Error codes
  • FORBIDDENYou are signed in but may not do this here; reason names the permission or the rule that refused it
  • INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs; required_scope names it
  • PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-1070",
"message": "Draw the region map from operation density"
}
}
404No page at this path, or no such commitapplication/json
Error codes
  • NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
404 exampleSynthesized example
{
"error": {
"code": "code-cf5f",
"message": "Draw the region map from operation density"
}
}

CLI

gitmoap wiki get-repo-wiki-page-revision

  • --repo-ididRepository ID (id or owner/repo path)
  • --pathidURL-encoded wiki page path
  • --shastringThe commit to read the page at