Knowledgewiki
GET/repositories/{repo_id}/wiki/pages/{path}
Read one wiki page
get_repo_wiki_page
wiki:read
A token needs thewiki:readscope: Read wiki pages, their history and their backlinksGranted bymcp_agent,mcp_agent_write,read_api,write_api.Every operation this scope unlocks
Answers the page's content, its table of contents and the wiki's head commit, which you send
back as expected_head_sha when you save an edit. A page that has moved is still found at its
old address, and the response then names the address you asked for so you can update the link.
The table of contents can be empty for a page written moments ago, until it has been indexed.
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
Responses
200The page, its content and its table of contents. When the page has moved, its old address still finds it and the response names the old address you asked forapplication/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
- The WikiRevision schema
- author_namestring
- committed_atstring
- messagestring
- shastring
authorActorSummary or nulloptional
- The ActorSummary schema
- emailstring
- idstring
- usernamestring
- avatar_urlstring or nulloptional
created_byActorSummary or nulloptional
- The ActorSummary schema
- emailstring
- idstring
- usernamestring
- avatar_urlstring or nulloptional
- head_shaCommitHash (string) or nulloptionalThe commit the content was read at — the
ETagvalidator. 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-de5e",
"created_at": "2026-10-11T15:24:39Z",
"doc_id": "919e10e4-0f9c-4cc1-9361-7a6f18e56db2",
"format": "markdown",
"path": "path-9f3f",
"title": "Label every synthesized example",
"toc": [
{
"anchor": "anchor-7e1e",
"heading": "heading-54cf",
"level": 13,
"ordinal": 49
},
{
"anchor": "anchor-2e9b",
"heading": "heading-a291",
"level": 35,
"ordinal": 44
}
],
"updated_at": "2026-10-12T18:18:50Z",
"wiki_id": "efc79343-b766-42d5-9a5a-59870fa2f022",
"wiki_page_id": "447b6843-509f-4304-91b4-5afbbefb0482",
"commit": {
"author_name": "Lin Park",
"committed_at": "2026-10-16T17:44:06Z",
"message": "Draw the region map from operation density",
"sha": "a63d4560a462ac8bcb544782ed6d22d92e04d481",
"author": {
"email": "lin@acme.example",
"id": "id-359c",
"username": "lin",
"avatar_url": "https://gitmoap.example/acme/94ee4fd6"
}
},
"created_by": {
"email": "mara@acme.example",
"id": "id-3071",
"username": "tomas",
"avatar_url": "https://gitmoap.example/acme/4e0211c3"
},
"head_sha": "c6a3e4fdcbf7f28b5ff4cf51ecb1cbca6b875e47",
"redirected_from": "redirected-from-420e"
}
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
reasonorcode. - fieldstring or nulloptionalOn a
400that 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 oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): 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-d7d1",
"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
reasonorcode. - fieldstring or nulloptionalOn a
400that 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 oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): 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-7d1d",
"message": "Draw the region map from operation density"
}
}
403Forbidden — the caller's access level or token scope is insufficientapplication/json
Error codes
- FORBIDDENYou are signed in but may not do this here;
reasonnames the permission or the rule that refused it - INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs;
required_scopenames 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
reasonorcode. - fieldstring or nulloptionalOn a
400that 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 oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): 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-7796",
"message": "Pin a page's payload to the build that rendered it"
}
}
404No page at this path, and no redirect from itapplication/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
reasonorcode. - fieldstring or nulloptionalOn a
400that 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 oncodeotherwise. - required_scopestring or nulloptionalThe scope the access token was missing, on
INSUFFICIENT_SCOPE. - violationsanyoptionalPresent on the structured-validation errors (
PROVIDER_VALIDATION_FAILEDper-node,PIPELINE_VALIDATION_FAILEDDAG): 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-be9d",
"message": "Draw the region map from operation density"
}
}
CLI
gitmoap wiki get-repo-wiki-page
- --repo-ididRepository ID (id or owner/repo path)
- --pathidURL-encoded wiki page path