Returns the content of a wiki page. URL: GET /api/wiki/{id}/content
| Name | Type | Description |
|---|---|---|
| version | int | Page version number to retrieve. Defaults to the latest version. |
| editable | bool | When true, includes
editableContent (raw source) in the
response in addition to rendered HTML. Default
false. |
| skipHitCount | bool | When true, suppresses the page-view
counter increment. Default false. |
Object with the following fields:
| Field | Type | Description |
|---|---|---|
| content_type | string | MIME type of the stored source content. Either text/html or text/markdown. Reflects how the content was originally saved — not the format of the rendered data field (which is always HTML). Use this field to detect markdown pages in web editors and MCP/LLM tool calls. |
| encoding | string | Character encoding. Always utf-8. |
| data | string | Rendered HTML string. |
| id | int | Filesystem record id. |
| editableContent | string | Raw source content (only present when editable=true). |
Returns a diff between two versions of a wiki page.
| Name | Type | Description |
|---|---|---|
| id | string | Wiki page id or pagename. Required. |
| version1 | int | First version number to compare. Required. |
| version2 | int | Second version number to compare. Required. |
Returns wiki pages that would become orphans (unreferenced) if the given wiki page were deleted. These are pages linked from the target page that have no other incoming links.
| Name | Type | Description |
|---|---|---|
| id | string | Wiki page id or pagename. Required. |
| Name | Type | Description |
|---|---|---|
| id | int | |
| section | string | |
| refId | int | |
| pagename | string | |
| flags | int | |
| latestVersion | int | |
| pageViews | int | |
| html_url | string | Relative path to the wikipage's html page (display) |
| content_url | string | Relative path to the wikipage content data (API) |
| displayName | string|null | Human-readable display name parsed from link syntax |
Returns wiki pages that link to the given wiki page.
| Name | Type | Description |
|---|---|---|
| id | string | Wiki page id or pagename. Required. |
| Name | Type | Description |
|---|---|---|
| id | int | Id of the wikiVersion |
| pageVersion | int | Version number |
| lastModifiedDate | string | Date this version was last modified |
| createDate | string | Date this version was created |
| wikiPage | \WikiPageBasic | Related wiki page |
| user | \gforge\core\models\api\UserBasic | User that created this version |
Returns the version history of a wiki page.
| Name | Type | Description |
|---|---|---|
| id | string | Wiki page id or pagename. Required. |
| page_num | int | Page number (zero-based). Default 0. |
| page_size | int | Number of versions per page. Default 20. |
page_size and page_num parameters to control the set of records
returned.| Name | Type | Description |
|---|---|---|
| id | int | Id of the wikiVersion |
| pageVersion | int | Version number |
| lastModifiedDate | string | Date this version was last modified |
| createDate | string | Date this version was created |
| wikiPage | \WikiPageBasic | Related wiki page |
| user | \gforge\core\models\api\UserBasic | User that created this version |
User needs to be authenticated to use this service. Returns 0 or more WikiPageBasic
models. If an id is provided, returns that single record; otherwise performs
a filtered, pageable search.
| Name | Type | Description |
|---|---|---|
| id | string | Wiki page id or pagename. When provided, returns a single record. |
| project | string | Project id or unixName. Filter to project wiki pages. |
| user | string | User id or unixName. Filter to user wiki pages. |
| section | string | Section type (e.g. project, user).
Use with refId for tracker-item pages. |
| refId | int | Id of the section entity. Use with section. |
| sort_field | string | Field name to sort by. Default id. |
| sort_dir | string | Sort direction: asc or desc. Default asc. |
| page_num | int | Page number (zero-based). Default 0. |
| page_size | int | Records per page. Default from config query.pagsize. |
sort_field and sort_dir parameters to control the order in which
records are returned.page_size and page_num parameters to control the set of records
returned.Single object if id is provided, paged array otherwise.
| Name | Type | Description |
|---|---|---|
| id | int | |
| section | string | |
| refId | int | |
| pagename | string | |
| flags | int | |
| latestVersion | int | |
| pageViews | int | |
| html_url | string | Relative path to the wikipage's html page (display) |
| content_url | string | Relative path to the wikipage content data (API) |
| displayName | string|null | Human-readable display name parsed from link syntax |
GET http://api.mygforge.tld/api/wiki/1234
{
id: 55,
section: "project",
refId: 134,
pagename: "FrontPage",
flags: 0,
latestVersion: 1,
pageViews: 1,
html_url: "/gf/project/msproject/wiki/?pagename=FrontPage",
content_url: "/api/wiki/55/content"
}
GET http://api.mygforge.tld/api/wiki/?refId=134&page_size=3&page_num=1&sort_field=pagename&sort_dir=desc
[
{"id":61,"section":"project","refId":134,"pagename":"MostPopular","flags":0,"latestVersion":1,"pageViews":0},
{"id":57,"section":"project","refId":134,"pagename":"HowToUseWiki","flags":0,"latestVersion":1,"pageViews":0},
{"id":63,"section":"project","refId":134,"pagename":"GoodStyle","flags":0,"latestVersion":1,"pageViews":0}
]
GET http://api.mygforge.tld/api/wiki/?project=gforge5&pagename=FrontPage
GET http://api.mygforge.tld/api/wiki/?user=123&pagename=My+User+Wiki
[
{"id":68,"section":"user","refId":123,"pagename":"My+User+Wiki","flags":0,"latestVersion":1,"pageViews":1},
]
Converts the HTML content of a wiki page to Markdown. If the page is already stored as Markdown, returns it unchanged.
| Name | Type | Description |
|---|---|---|
| id | string | Wiki page id or pagename. Required. |
| version | int | Page version number to convert. Defaults to the latest version. |
Result object:
| Field | Type | Description |
|---|---|---|
| success | bool | Always true. |
| originalHtml | string | The original HTML before conversion. Empty if already Markdown. |
| markdown | string | The converted or existing Markdown content. |
| validation | object | Conversion validation result with success and warnings. |
| quality | float | Estimated conversion quality score (0.0–1.0). |
| wikiPageId | int | Database id of the wiki page. |
| pagename | string | Page name of the wiki page. |
Create a new wiki page entry if necessary
| Name | Type | Description |
|---|---|---|
| id | string | In route this should be the pagename. Required |
| project | string | Project associated with wiki. Required |
Set the locked/unlocked status of a wiki page. Requires admin rights on the page.
| Name | Type | Description |
|---|---|---|
| id | string | Wiki page id or pagename. Required. |
| lock_status | int | Lock state. 1 = locked, 0 = unlocked. Required. |
Update wiki settings for a project.
| Name | Type | Description |
|---|---|---|
| project | string | Project id or unixName. Required. |
| isPublic | bool | Whether the wiki is publicly readable. |
| wikiType | int | Content type for the project wiki.
1 = HTML, 2 = plain text, 3 = Markdown. |
| showAssociationsTab | bool | Whether to show the associations tab. |
| showTagsTab | bool | Whether to show the tags tab. |
| Name | Type | Description |
|---|---|---|
| isPublic | bool | Whether the wiki is publicly readable |
| wikiType | int | Content type: 1 = HTML, 2 = plain text, 3 = Markdown |
| showAssociationsTab | bool | Whether the associations tab is shown |
| showTagsTab | bool | Whether the tags tab is shown |
| project | \gforge\core\models\api\ProjectBasic | Associated project |
Create or update a wiki page and save its content.
| Name | Type | Description |
|---|---|---|
| id | int | Database ID of the wiki page. Required for updates; omit to create a new page. |
| content | string | Content to save. Required. |
| content_type | string | MIME type of the content being saved.
Accepted values: text/html (default)
or text/markdown.
Determines how the content is stored and
interpreted by the rendering layer. Use
text/markdown when posting from
markdown editors or MCP/LLM tool calls. |
| project | string | Project id or unixName. Required when creating a new page without section/refId. |
| pagename | string | Page name. Defaults to FrontPage. |
| section | string | Section type (e.g. project or
user). Use with refId
as an alternative to project. |
| refId | int | Id of the section entity (project id or user id).
Use with section. |
The saved wiki page record.
| Name | Type | Description |
|---|---|---|
| id | int | |
| section | string | |
| refId | int | |
| pagename | string | |
| flags | int | |
| latestVersion | int | |
| pageViews | int | |
| html_url | string | Relative path to the wikipage's html page (display) |
| content_url | string | Relative path to the wikipage content data (API) |
| displayName | string|null | Human-readable display name parsed from link syntax |
Delete a wiki page and all its versions.
| Name | Type | Description |
|---|---|---|
| id | string | Wiki page id or pagename. Required. |