Use this API to manage group wikis. An API for project wikis is also available.

Comments on a wiki page are called notes. To interact with them, use the notes API.

List all wiki pages for a group

GET /api/v4/groups/{id}/wikis

Lists all wiki pages for a specified group.

Parameters

NameTypeDescription
id
Path, required
String or integerID or URL-encoded path of the group or project
with_content
Query
BooleanIf true, includes the content of each wiki page
Default: false

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesWikiPageBasic
400Bad Request—
404Not found—

Create a wiki page for a group

POST /api/v4/groups/{id}/wikis

Creates a wiki page for a specified group. Requests can define the title, slug, and content.

Parameters

NameTypeDescription
id
Path, required
String or integerID or URL-encoded path of the group or project

Request body (application/json)

PropertyTypeDescription
content
Required
StringContent of the wiki page
formatStringFormat of the wiki page
Allowed values: markdown, rdoc, asciidoc, org
Default: markdown
front_matterObjectYAML front matter of the wiki page
front_matter.titleStringTitle in the front matter of the wiki page
title
Required
StringTitle of the wiki page

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesWikiPage
400Validation error—
404Not found—
422Unprocessable entity—

Upload an attachment to a group wiki

POST /api/v4/groups/{id}/wikis/attachments

Uploads a file to the uploads directory in a specified group wiki.

Parameters

NameTypeDescription
id
Path, required
String or integerID or URL-encoded path of the group or project

Request body (multipart/form-data)

PropertyTypeDescription
branchStringThe name of the branch
file
Required
String (binary)The attachment file to be uploaded

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesWikiAttachment
400Bad Request—
404Not found—

Retrieve a wiki page for a group

GET /api/v4/groups/{id}/wikis/{slug}

Retrieves a specified wiki page for a group.

Parameters

NameTypeDescription
id
Path, required
String or integerID or URL-encoded path of the group or project
slug
Path, required
StringURL-encoded slug of the wiki page, a unique string such as dir%2Fpage_name
version
Query
StringVersion SHA of the wiki page
render_html
Query
BooleanIf true, returns the rendered HTML of the wiki page
Default: false

Responses

CodeDescriptionSchema
200OKAPIEntitiesWikiPage
400Bad Request—
404Not found—

Update a wiki page for a group

PUT /api/v4/groups/{id}/wikis/{slug}

Updates a specified wiki page for a group.

Parameters

NameTypeDescription
id
Path, required
String or integerID or URL-encoded path of the group or project
slug
Path, required
StringURL-encoded slug of the wiki page, a unique string such as dir%2Fpage_name

Request body (application/json)

PropertyTypeDescription
contentStringContent of the wiki page. At least one of content, title, format must be provided
formatStringFormat of the wiki page. At least one of content, title, format must be provided
Allowed values: markdown, rdoc, asciidoc, org
Default: markdown
front_matterObjectYAML front matter of the wiki page
front_matter.titleStringTitle in the front matter of the wiki page
titleStringTitle of the wiki page. At least one of content, title, format must be provided

Responses

CodeDescriptionSchema
200OKAPIEntitiesWikiPage
400Validation error—
404Not found—
422Unprocessable entity—

Delete a wiki page for a group

DELETE /api/v4/groups/{id}/wikis/{slug}

Deletes a specified wiki page from a group.

Parameters

NameTypeDescription
id
Path, required
String or integerID or URL-encoded path of the group or project
slug
Path, required
StringURL-encoded slug of the wiki page, a unique string such as dir%2Fpage_name

Responses

CodeDescriptionSchema
204No Content—
400Validation error—
404Not found—

List all wiki pages for a project

GET /api/v4/projects/{id}/wikis

Lists all wiki pages for a specified project.

Parameters

NameTypeDescription
id
Path, required
String or integerID or URL-encoded path of the group or project
with_content
Query
BooleanIf true, includes the content of each wiki page
Default: false

Responses

CodeDescriptionSchema
200OKArray of APIEntitiesWikiPageBasic
400Bad Request—
404Not found—

Create a wiki page for a project

POST /api/v4/projects/{id}/wikis

Creates a wiki page for a specified project. Requests can define the title, slug, and content.

Parameters

NameTypeDescription
id
Path, required
String or integerID or URL-encoded path of the group or project

Request body (application/json)

PropertyTypeDescription
content
Required
StringContent of the wiki page
formatStringFormat of the wiki page
Allowed values: markdown, rdoc, asciidoc, org
Default: markdown
front_matterObjectYAML front matter of the wiki page
front_matter.titleStringTitle in the front matter of the wiki page
title
Required
StringTitle of the wiki page

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesWikiPage
400Validation error—
404Not found—
422Unprocessable entity—

Upload an attachment to a project wiki

POST /api/v4/projects/{id}/wikis/attachments

Uploads a file to the uploads directory in a specified project wiki.

Parameters

NameTypeDescription
id
Path, required
String or integerID or URL-encoded path of the group or project

Request body (multipart/form-data)

PropertyTypeDescription
branchStringThe name of the branch
file
Required
String (binary)The attachment file to be uploaded

Responses

CodeDescriptionSchema
201CreatedAPIEntitiesWikiAttachment
400Bad Request—
404Not found—

Retrieve a wiki page for a project

GET /api/v4/projects/{id}/wikis/{slug}

Retrieves a specified wiki page for a project.

Parameters

NameTypeDescription
id
Path, required
String or integerID or URL-encoded path of the group or project
slug
Path, required
StringURL-encoded slug of the wiki page, a unique string such as dir%2Fpage_name
version
Query
StringVersion SHA of the wiki page
render_html
Query
BooleanIf true, returns the rendered HTML of the wiki page
Default: false

Responses

CodeDescriptionSchema
200OKAPIEntitiesWikiPage
400Bad Request—
404Not found—

Update a wiki page for a project

PUT /api/v4/projects/{id}/wikis/{slug}

Updates a specified wiki page for a project.

Parameters

NameTypeDescription
id
Path, required
String or integerID or URL-encoded path of the group or project
slug
Path, required
StringURL-encoded slug of the wiki page, a unique string such as dir%2Fpage_name

Request body (application/json)

PropertyTypeDescription
contentStringContent of the wiki page. At least one of content, title, format must be provided
formatStringFormat of the wiki page. At least one of content, title, format must be provided
Allowed values: markdown, rdoc, asciidoc, org
Default: markdown
front_matterObjectYAML front matter of the wiki page
front_matter.titleStringTitle in the front matter of the wiki page
titleStringTitle of the wiki page. At least one of content, title, format must be provided

Responses

CodeDescriptionSchema
200OKAPIEntitiesWikiPage
400Validation error—
404Not found—
422Unprocessable entity—

Delete a wiki page for a project

DELETE /api/v4/projects/{id}/wikis/{slug}

Deletes a specified wiki page from a project.

Parameters

NameTypeDescription
id
Path, required
String or integerID or URL-encoded path of the group or project
slug
Path, required
StringURL-encoded slug of the wiki page, a unique string such as dir%2Fpage_name

Responses

CodeDescriptionSchema
204No Content—
400Validation error—
404Not found—

Schemas

Objects returned by the operations above and objects nested in their request bodies.

APIEntitiesWikiAttachment

PropertyTypeDescription
branchStringExample: main
file_nameStringExample: dk.png
file_pathStringExample: uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png
linkObject—
link.markdownStringExample: ![dk](uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png)
link.urlStringExample: uploads/6a061c4cf9f1c28cb22c384b4b8d4e3c/dk.png

APIEntitiesWikiPage

PropertyTypeDescription
contentStringExample: Here is an instruction how to deploy this project.
encodingStringExample: UTF-8
formatStringExample: markdown
front_matterObjectExample: {"title":"deploy"}
slugStringExample: deploy
titleStringExample: deploy
wiki_page_meta_idInteger (int64)Example: 123

APIEntitiesWikiPageBasic

PropertyTypeDescription
formatStringExample: markdown
slugStringExample: deploy
titleStringExample: deploy
wiki_page_meta_idInteger (int64)Example: 123