Knowledgewiki
GET/repositories/{repo_id}/wiki/pages
List a wiki's pages as a tree
list_repo_wiki_pages
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 unlocksSingle-resource
x-gitmoap-isolation: {"kind":"single_or_self_scoped"}
Paginated
Pass thenext_tokena page returns to get the next one.
Pages come in path order, so the pages of one directory sit together. Paginated with limit (at
most 200) and next_token. Answers 404 when there is no enabled wiki. 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
Query
- prefixstringoptionalReturn only the subtree under this path
- limitinteger · int32optionalPage size (1-200)
- next_tokenstringoptionalPagination cursor, a position in path order
Responses
200The page tree, in path orderapplication/json
itemsarray of WikiPage
- The WikiPage schema
- 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)
- updated_atstring
- wiki_idWikiId (string · uuid)
- wiki_page_idWikiPageId (string · uuid)
created_byActorSummary or nulloptional
- The ActorSummary schema
- emailstring
- idstring
- usernamestring
- avatar_urlstring or nulloptional
- next_tokenstring or nulloptional
200 exampleSynthesized example
{
"items": [
{
"created_at": "2026-10-16T10:40:33Z",
"doc_id": "80357bb6-4850-425f-93e2-ee9937cefb78",
"format": "markdown",
"path": "path-a4f8",
"title": "Label every synthesized example",
"updated_at": "2026-10-11T01:11:11Z",
"wiki_id": "03c7becf-0269-4e64-b229-ac8332a0134e",
"wiki_page_id": "79c79aa9-87bc-43ea-b588-fd6963289b17"
},
{
"created_at": "2026-10-10T16:21:40Z",
"doc_id": "d49b0872-d963-4276-b001-1ad20a74f2fc",
"format": "markdown",
"path": "path-b66c",
"title": "Pin a page's payload to the build that rendered it",
"updated_at": "2026-10-11T10:50:42Z",
"wiki_id": "8cf7332b-a667-4ab4-ad22-49cb03e56b23",
"wiki_page_id": "c4c70d49-f295-4569-a313-0b6bfba04193"
}
],
"next_token": "next-token-f49b"
}
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-91b1",
"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-69f8",
"message": "Stream pipeline status into the run header"
}
}
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-69ea",
"message": "Inline scalar newtypes but keep their brand"
}
}
404This scope has no wiki, or it is not visible to the callerapplication/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-4d08",
"message": "Draw the region map from operation density"
}
}
CLI
gitmoap wiki list-repo-wiki-pages
- --repo-ididRepository ID (id or owner/repo path)
- --limitnumberoptionalPage size (1-200)
- --next-tokenstringoptionalPagination cursor, a position in path order
- --prefixstringoptionalReturn only the subtree under this path