Skip to main content
The WikiService provides methods for creating, updating, and retrieving wiki pages stored in Git repositories.

WikiWritePage

Creates a new wiki page.

Request (Stream)

repository
Repository
required
The repository containing the wiki. Only present in the first message.
name
bytes
required
The name of the wiki page. Only present in the first message.
format
string
required
The markup format of the page (e.g., “markdown”, “rdoc”, “asciidoc”). Only present in the first message.
commit_details
WikiCommitDetails
required
Details about the commit to create. Only present in the first message.
content
bytes
required
The content of the wiki page. Present in all messages (streamed for large pages).

WikiCommitDetails

name
bytes
Name of the author/committer
email
bytes
Email of the author/committer
message
bytes
Commit message
user_id
int32
GitLab user ID
user_name
bytes
GitLab username

Response

duplicate_error
bytes
Error message if a page with the same name already exists

WikiUpdatePage

Updates an existing wiki page.

Request (Stream)

repository
Repository
required
The repository containing the wiki. Only present in the first message.
page_path
bytes
required
The path to the wiki page file. Only present in the first message.
title
bytes
required
The new title for the page. Only present in the first message.
format
string
required
The markup format of the page. Only present in the first message.
commit_details
WikiCommitDetails
required
Details about the commit to create. Only present in the first message.
content
bytes
required
The updated content of the wiki page. Present in all messages (streamed for large pages).

Response

error
bytes
Error message if the update failed

WikiFindPage

Finds and returns a wiki page. Returns a stream because the page’s raw_data field may be arbitrarily large.

Request

repository
Repository
required
The repository containing the wiki
title
bytes
required
The title of the page to find
revision
bytes
The Git revision to retrieve the page from
directory
bytes
The directory to search within
skip_content
bool
If true, prevents the content from being sent in the response

Response (Stream)

page
WikiPage
The wiki page data

WikiPage

version
WikiPageVersion
Version information. Only present in the first message.
format
string
Markup format. Only present in the first message.
title
bytes
Page title. Only present in the first message.
url_path
string
URL path for the page. Only present in the first message.
path
bytes
File system path. Only present in the first message.
name
bytes
Page name. Only present in the first message.
historical
bool
Whether this is a historical version. Only present in the first message.
raw_data
bytes
Page content data. Present in all messages of the stream.

WikiGetAllPages

Retrieves all wiki pages with optional sorting and limiting.

Request

repository
Repository
required
The repository containing the wiki
limit
uint32
Maximum number of pages to return. Passing 0 means no limit is applied.
direction_desc
bool
If true, sort in descending order
sort
SortBy
Field to sort by. Values: TITLE, CREATED_AT

Response (Stream)

The response stream is a concatenation of WikiPage streams.
page
WikiPage
Wiki page data (see WikiPage structure above)
end_of_page
bool
When true, signals a change of page for the next response message

WikiListPages

Lists wiki pages without their content, with pagination support.

Request

repository
Repository
required
The repository containing the wiki
limit
uint32
Maximum number of pages to return. Passing 0 means no limit is applied.
direction_desc
bool
If true, sort in descending order
sort
SortBy
Field to sort by. Values: TITLE, CREATED_AT
offset
uint32
Number of pages to skip for pagination

Response (Stream)

page
WikiPage
Wiki page data without content (see WikiPage structure above, but raw_data will be empty)

Build docs developers (and LLMs) love