- Wiki
  - get Find all wiki pages
  - get Find all wiki pages by container
  - del Deletes a wiki pages by container
- Wiki Page
  - post Create new wiki page
  - get Get wiki page by id
  - put Update wiki page by id
  - del Deletes a wiki page by id
- Wiki Page Management
  - patch Move page to another category
  - patch Move page to another space
- Wiki Page Revision
  - get Find all revisions for page
  - get Get revision by id
  - patch Revert page by revision id

API docs by Redocly

# HumHub - Wiki API (1.0.0)

Download OpenAPI specification:

E-mail: info@humhub.com License: AGPLv2

Welcome to the HumHub wiki module API reference.

## Wiki

## Find all wiki pages

##### query Parameters

page | integer >= 0 The number of page of the result set.
limit | integer [ 1 .. 50 ] Default: 20 The numbers of items to return per page.

### Responses

/api/v1/wiki

### Response samples

- 200

Content type
application/json
`
{

- "total": 76,
- "page": 1,
- "results":
  [
  - {
    - "id": 201,
    - "title": "Some Wikipage title",
    - "is_home": 1,
    - "admin_only": 1,
    - "parent_page_id": null,
    - "permalink": "http://localhost/content/perma?id=609",
    - "latest_revision":
      {
      - "id": 2424,
      - "revision": 1534454147,
      - "is_latest": 1,
      - "wiki_page_id": 201,
      - "created_by":
        {
        - "id": 14,
        - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
        - "display_name": "John Doe",
        - "url": "http://localhost/p/humhub/master/u/j.doe/"
        },
      - "message": "The wiki page content in markdown."
      },
    - "content":
      {
      - "metadata":
        {
        - "id": 14,
        - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
        - "object_model": "humhub\\modules\\post\\models\\Post",
        - "object_id": 12,
        - "visibility": 1,
        - "state": 1,
        - "archived": true,
        - "hidden": true,
        - "pinned": false,
        - "locked_comments": false,
        - "scheduled_at": "2023-09-14 05:15:00",
        - "created_by":
          {
          - "id": 14,
          - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
          - "display_name": "John Doe",
          - "url": "http://localhost/p/humhub/master/u/j.doe/"
          },
        - "created_at": "2022-04-13 05:15:43",
        - "updated_by":
          {
          - "id": 14,
          - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
          - "display_name": "John Doe",
          - "url": "http://localhost/p/humhub/master/u/j.doe/"
          },
        - "updated_at": "2022-05-21 06:20:18",
        - "url": "http://localhost/p/humhub/master/content/perma?id=109",
        - "contentcontainer_id": 5,
        - "stream_channel": "default"
        },
      - "comments":
        {
        - "total": 55,
        - "latestComments":
          [
          - {
            - "id": 14,
            - "message": "Calvin Klein – Between love and madness lies obsession.",
            - "objectModel": "humhub\\modules\\post\\models\\Post",
            - "objectId": 123,
            - "createdBy":
              {
              - "id": 14,
              - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
              - "display_name": "John Doe",
              - "url": "http://localhost/p/humhub/master/u/j.doe/"
              },
            - "createdAt": "2018-08-09 14:22:03",
            - "commentsCount": 5,
            - "comments":
              [
              - { }
              ]
            }
          ]
        },
      - "likes":
        {
        - "total": 35
        },
      - "files":
        {
        - "id": 14,
        - "guid": "bded6dc7-e6f4-417e-a638-b653525529ca",
        - "mime_type": "text/plain",
        - "size": 14353,
        - "file_name": "image.jpg",
        - "url": "http://localhost/p/humhub/master/file/file/download?guid=bded6dc7-e6f4-417e-a638-b653525529ca"
        },
      - "topics":
        [
        - {
          - "id": 135,
          - "name": "News"
          }
        ]
      }
    }
  ]

}`

## Find all wiki pages by container

##### path Parameters

id required | integer ID of content container

##### query Parameters

page | integer >= 0 The number of page of the result set.
limit | integer [ 1 .. 50 ] Default: 20 The numbers of items to return per page.

### Responses

/api/v1/wiki/container/{id}

### Response samples

- 200

Content type
application/json
`
{

- "total": 76,
- "page": 1,
- "results":
  [
  - {
    - "id": 201,
    - "title": "Some Wikipage title",
    - "is_home": 1,
    - "admin_only": 1,
    - "parent_page_id": null,
    - "permalink": "http://localhost/content/perma?id=609",
    - "latest_revision":
      {
      - "id": 2424,
      - "revision": 1534454147,
      - "is_latest": 1,
      - "wiki_page_id": 201,
      - "created_by":
        {
        - "id": 14,
        - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
        - "display_name": "John Doe",
        - "url": "http://localhost/p/humhub/master/u/j.doe/"
        },
      - "message": "The wiki page content in markdown."
      },
    - "content":
      {
      - "metadata":
        {
        - "id": 14,
        - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
        - "object_model": "humhub\\modules\\post\\models\\Post",
        - "object_id": 12,
        - "visibility": 1,
        - "state": 1,
        - "archived": true,
        - "hidden": true,
        - "pinned": false,
        - "locked_comments": false,
        - "scheduled_at": "2023-09-14 05:15:00",
        - "created_by":
          {
          - "id": 14,
          - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
          - "display_name": "John Doe",
          - "url": "http://localhost/p/humhub/master/u/j.doe/"
          },
        - "created_at": "2022-04-13 05:15:43",
        - "updated_by":
          {
          - "id": 14,
          - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
          - "display_name": "John Doe",
          - "url": "http://localhost/p/humhub/master/u/j.doe/"
          },
        - "updated_at": "2022-05-21 06:20:18",
        - "url": "http://localhost/p/humhub/master/content/perma?id=109",
        - "contentcontainer_id": 5,
        - "stream_channel": "default"
        },
      - "comments":
        {
        - "total": 55,
        - "latestComments":
          [
          - {
            - "id": 14,
            - "message": "Calvin Klein – Between love and madness lies obsession.",
            - "objectModel": "humhub\\modules\\post\\models\\Post",
            - "objectId": 123,
            - "createdBy":
              {
              - "id": 14,
              - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
              - "display_name": "John Doe",
              - "url": "http://localhost/p/humhub/master/u/j.doe/"
              },
            - "createdAt": "2018-08-09 14:22:03",
            - "commentsCount": 5,
            - "comments":
              [
              - { }
              ]
            }
          ]
        },
      - "likes":
        {
        - "total": 35
        },
      - "files":
        {
        - "id": 14,
        - "guid": "bded6dc7-e6f4-417e-a638-b653525529ca",
        - "mime_type": "text/plain",
        - "size": 14353,
        - "file_name": "image.jpg",
        - "url": "http://localhost/p/humhub/master/file/file/download?guid=bded6dc7-e6f4-417e-a638-b653525529ca"
        },
      - "topics":
        [
        - {
          - "id": 135,
          - "name": "News"
          }
        ]
      }
    }
  ]

}`

## Deletes a wiki pages by container

##### path Parameters

id required | integer The id of content container

### Responses

/api/v1/wiki/container/{id}

### Response samples

- 200
- 404

Content type
application/json
`
{

- "code": 200,
- "message": "Records successfully deleted!"

}`

## Wiki Page

## Create new wiki page

##### path Parameters

id required | integer The id of content container

##### Request Body schema: application/json

Wiki page information

required | object
required | object
| object
| object (Content)

### Responses

/api/v1/wiki/container/{id}

### Request samples

- Payload

Content type
application/json
`
{

- "WikiPage":
  {
  - "title": "First api page",
  - "is_home": 0,
  - "admin_only": 0,
  - "parent_page_id": 0
  },
- "WikiPageRevision":
  {
  - "content": "First api page content"
  },
- "PageEditForm":
  {
  - "isPublic": 0,
  - "hidden": 1,
  - "topics":
    [
    - 2,
    - 8
    ]
  },
- "content":
  {
  - "metadata":
    {
    - "visibility": 1,
    - "state": 1,
    - "archived": true,
    - "hidden": true,
    - "pinned": false,
    - "locked_comments": false,
    - "scheduled_at": "2023-09-14 05:15:00",
    - "created_at": "2022-04-13 05:15:43"
    },
  - "topics":
    [
    - {
      - "name": "News"
      }
    ]
  }

}`

### Response samples

- 200
- 404
- 500

Content type
application/json
`
{

- "id": 201,
- "title": "Some Wikipage title",
- "is_home": 1,
- "admin_only": 1,
- "parent_page_id": null,
- "permalink": "http://localhost/content/perma?id=609",
- "latest_revision":
  {
  - "id": 2424,
  - "revision": 1534454147,
  - "is_latest": 1,
  - "wiki_page_id": 201,
  - "created_by":
    {
    - "id": 14,
    - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
    - "display_name": "John Doe",
    - "url": "http://localhost/p/humhub/master/u/j.doe/"
    },
  - "message": "The wiki page content in markdown."
  },
- "content":
  {
  - "metadata":
    {
    - "id": 14,
    - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
    - "object_model": "humhub\\modules\\post\\models\\Post",
    - "object_id": 12,
    - "visibility": 1,
    - "state": 1,
    - "archived": true,
    - "hidden": true,
    - "pinned": false,
    - "locked_comments": false,
    - "scheduled_at": "2023-09-14 05:15:00",
    - "created_by":
      {
      - "id": 14,
      - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
      - "display_name": "John Doe",
      - "url": "http://localhost/p/humhub/master/u/j.doe/"
      },
    - "created_at": "2022-04-13 05:15:43",
    - "updated_by":
      {
      - "id": 14,
      - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
      - "display_name": "John Doe",
      - "url": "http://localhost/p/humhub/master/u/j.doe/"
      },
    - "updated_at": "2022-05-21 06:20:18",
    - "url": "http://localhost/p/humhub/master/content/perma?id=109",
    - "contentcontainer_id": 5,
    - "stream_channel": "default"
    },
  - "comments":
    {
    - "total": 55,
    - "latestComments":
      [
      - {
        - "id": 14,
        - "message": "Calvin Klein – Between love and madness lies obsession.",
        - "objectModel": "humhub\\modules\\post\\models\\Post",
        - "objectId": 123,
        - "createdBy":
          {
          - "id": 14,
          - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
          - "display_name": "John Doe",
          - "url": "http://localhost/p/humhub/master/u/j.doe/"
          },
        - "createdAt": "2018-08-09 14:22:03",
        - "commentsCount": 5,
        - "comments":
          [
          - { }
          ]
        }
      ]
    },
  - "likes":
    {
    - "total": 35
    },
  - "files":
    {
    - "id": 14,
    - "guid": "bded6dc7-e6f4-417e-a638-b653525529ca",
    - "mime_type": "text/plain",
    - "size": 14353,
    - "file_name": "image.jpg",
    - "url": "http://localhost/p/humhub/master/file/file/download?guid=bded6dc7-e6f4-417e-a638-b653525529ca"
    },
  - "topics":
    [
    - {
      - "id": 135,
      - "name": "News"
      }
    ]
  }

}`

## Get wiki page by id

##### path Parameters

id required | integer The id of the wiki page

### Responses

/api/v1/wiki/page/{id}

### Response samples

- 200
- 404

Content type
application/json
`
{

- "id": 201,
- "title": "Some Wikipage title",
- "is_home": 1,
- "admin_only": 1,
- "parent_page_id": null,
- "permalink": "http://localhost/content/perma?id=609",
- "latest_revision":
  {
  - "id": 2424,
  - "revision": 1534454147,
  - "is_latest": 1,
  - "wiki_page_id": 201,
  - "created_by":
    {
    - "id": 14,
    - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
    - "display_name": "John Doe",
    - "url": "http://localhost/p/humhub/master/u/j.doe/"
    },
  - "message": "The wiki page content in markdown."
  },
- "content":
  {
  - "metadata":
    {
    - "id": 14,
    - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
    - "object_model": "humhub\\modules\\post\\models\\Post",
    - "object_id": 12,
    - "visibility": 1,
    - "state": 1,
    - "archived": true,
    - "hidden": true,
    - "pinned": false,
    - "locked_comments": false,
    - "scheduled_at": "2023-09-14 05:15:00",
    - "created_by":
      {
      - "id": 14,
      - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
      - "display_name": "John Doe",
      - "url": "http://localhost/p/humhub/master/u/j.doe/"
      },
    - "created_at": "2022-04-13 05:15:43",
    - "updated_by":
      {
      - "id": 14,
      - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
      - "display_name": "John Doe",
      - "url": "http://localhost/p/humhub/master/u/j.doe/"
      },
    - "updated_at": "2022-05-21 06:20:18",
    - "url": "http://localhost/p/humhub/master/content/perma?id=109",
    - "contentcontainer_id": 5,
    - "stream_channel": "default"
    },
  - "comments":
    {
    - "total": 55,
    - "latestComments":
      [
      - {
        - "id": 14,
        - "message": "Calvin Klein – Between love and madness lies obsession.",
        - "objectModel": "humhub\\modules\\post\\models\\Post",
        - "objectId": 123,
        - "createdBy":
          {
          - "id": 14,
          - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
          - "display_name": "John Doe",
          - "url": "http://localhost/p/humhub/master/u/j.doe/"
          },
        - "createdAt": "2018-08-09 14:22:03",
        - "commentsCount": 5,
        - "comments":
          [
          - { }
          ]
        }
      ]
    },
  - "likes":
    {
    - "total": 35
    },
  - "files":
    {
    - "id": 14,
    - "guid": "bded6dc7-e6f4-417e-a638-b653525529ca",
    - "mime_type": "text/plain",
    - "size": 14353,
    - "file_name": "image.jpg",
    - "url": "http://localhost/p/humhub/master/file/file/download?guid=bded6dc7-e6f4-417e-a638-b653525529ca"
    },
  - "topics":
    [
    - {
      - "id": 135,
      - "name": "News"
      }
    ]
  }

}`

## Update wiki page by id

##### path Parameters

id required | integer The id of the wiki page

##### Request Body schema: application/json

Wiki page information

required | object
required | object
| object
| object (Content)

### Responses

/api/v1/wiki/page/{id}

### Request samples

- Payload

Content type
application/json
`
{

- "WikiPage":
  {
  - "title": "First api page",
  - "is_home": 0,
  - "admin_only": 0,
  - "parent_page_id": 0
  },
- "WikiPageRevision":
  {
  - "content": "First api page content"
  },
- "PageEditForm":
  {
  - "isPublic": 0,
  - "hidden": 1,
  - "topics":
    [
    - 2,
    - 8
    ]
  },
- "content":
  {
  - "metadata":
    {
    - "visibility": 1,
    - "state": 1,
    - "archived": true,
    - "hidden": true,
    - "pinned": false,
    - "locked_comments": false,
    - "scheduled_at": "2023-09-14 05:15:00",
    - "created_at": "2022-04-13 05:15:43"
    },
  - "topics":
    [
    - {
      - "name": "News"
      }
    ]
  }

}`

### Response samples

- 200
- 404
- 500

Content type
application/json
`
{

- "id": 201,
- "title": "Some Wikipage title",
- "is_home": 1,
- "admin_only": 1,
- "parent_page_id": null,
- "permalink": "http://localhost/content/perma?id=609",
- "latest_revision":
  {
  - "id": 2424,
  - "revision": 1534454147,
  - "is_latest": 1,
  - "wiki_page_id": 201,
  - "created_by":
    {
    - "id": 14,
    - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
    - "display_name": "John Doe",
    - "url": "http://localhost/p/humhub/master/u/j.doe/"
    },
  - "message": "The wiki page content in markdown."
  },
- "content":
  {
  - "metadata":
    {
    - "id": 14,
    - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
    - "object_model": "humhub\\modules\\post\\models\\Post",
    - "object_id": 12,
    - "visibility": 1,
    - "state": 1,
    - "archived": true,
    - "hidden": true,
    - "pinned": false,
    - "locked_comments": false,
    - "scheduled_at": "2023-09-14 05:15:00",
    - "created_by":
      {
      - "id": 14,
      - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
      - "display_name": "John Doe",
      - "url": "http://localhost/p/humhub/master/u/j.doe/"
      },
    - "created_at": "2022-04-13 05:15:43",
    - "updated_by":
      {
      - "id": 14,
      - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
      - "display_name": "John Doe",
      - "url": "http://localhost/p/humhub/master/u/j.doe/"
      },
    - "updated_at": "2022-05-21 06:20:18",
    - "url": "http://localhost/p/humhub/master/content/perma?id=109",
    - "contentcontainer_id": 5,
    - "stream_channel": "default"
    },
  - "comments":
    {
    - "total": 55,
    - "latestComments":
      [
      - {
        - "id": 14,
        - "message": "Calvin Klein – Between love and madness lies obsession.",
        - "objectModel": "humhub\\modules\\post\\models\\Post",
        - "objectId": 123,
        - "createdBy":
          {
          - "id": 14,
          - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
          - "display_name": "John Doe",
          - "url": "http://localhost/p/humhub/master/u/j.doe/"
          },
        - "createdAt": "2018-08-09 14:22:03",
        - "commentsCount": 5,
        - "comments":
          [
          - { }
          ]
        }
      ]
    },
  - "likes":
    {
    - "total": 35
    },
  - "files":
    {
    - "id": 14,
    - "guid": "bded6dc7-e6f4-417e-a638-b653525529ca",
    - "mime_type": "text/plain",
    - "size": 14353,
    - "file_name": "image.jpg",
    - "url": "http://localhost/p/humhub/master/file/file/download?guid=bded6dc7-e6f4-417e-a638-b653525529ca"
    },
  - "topics":
    [
    - {
      - "id": 135,
      - "name": "News"
      }
    ]
  }

}`

## Deletes a wiki page by id

##### path Parameters

id required | integer The id of wiki page

### Responses

/api/v1/wiki/page/{id}

### Response samples

- 200
- 404

Content type
application/json
`
{

- "code": 200,
- "message": "Successfully deleted!"

}`

## Wiki Page Management

## Move page to another category

##### path Parameters

id required | integer The id of the wiki page

##### Request Body schema: application/json
required

target_id required | integer <int64> Wiki page category id
index | integer <int64> Default: 0 Index for order

### Responses

/api/v1/wiki/page/{id}/change-index

### Request samples

- Payload

Content type
application/json
`
{

- "target_id": 2,
- "index": 2

}`

### Response samples

- 200
- 400
- 404
- 500

Content type
application/json
`
{

- "code": 200,
- "message": "Wiki page successfully moved!"

}`

## Move page to another space

##### path Parameters

id required | integer The id of the wiki page

##### Request Body schema: application/json
required

target required | string Guid of target space container

### Responses

/api/v1/wiki/page/{id}/move

### Request samples

- Payload

Content type
application/json
`
{

- "target": "c1c1c7dc-8197-471b-b5fe-2c12b183623a"

}`

### Response samples

- 200
- 400
- 404
- 500

Content type
application/json
`
{

- "code": 200,
- "message": "Wiki page successfully moved!"

}`

## Wiki Page Revision

## Find all revisions for page

##### path Parameters

pageId required | integer ID of wiki page

##### query Parameters

page | integer >= 0 The number of page of the result set.
limit | integer [ 1 .. 50 ] Default: 20 The numbers of items to return per page.

### Responses

/api/v1/wiki/page/{pageId}/revisions

### Response samples

- 200
- 404

Content type
application/json
`
{

- "total": 76,
- "page": 1,
- "pages": 8,
- "links":
  {
  - "self": "{endpoint_path}?page=1&per-page=10",
  - "next": "{endpoint_path}?page=2&per-page=10",
  - "last": "{endpoint_path}?page=8&per-page=10"
  },
- "results":
  [
  - {
    - "id": 2424,
    - "revision": 1534454147,
    - "is_latest": 1,
    - "wiki_page_id": 201,
    - "created_by":
      {
      - "id": 14,
      - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
      - "display_name": "John Doe",
      - "url": "http://localhost/p/humhub/master/u/j.doe/"
      },
    - "message": "The wiki page content in markdown."
    }
  ]

}`

## Get revision by id

##### path Parameters

id required | integer The id of the revision

### Responses

/api/v1/wiki/revision/{id}

### Response samples

- 200
- 404

Content type
application/json
`
{

- "id": 2424,
- "revision": 1534454147,
- "is_latest": 1,
- "wiki_page_id": 201,
- "created_by":
  {
  - "id": 14,
  - "guid": "cd081891-d2e2-40d5-84a4-b47309e71c80",
  - "display_name": "John Doe",
  - "url": "http://localhost/p/humhub/master/u/j.doe/"
  },
- "message": "The wiki page content in markdown."

}`

## Revert page by revision id

##### path Parameters

id required | integer The id of the revision

### Responses

/api/v1/wiki/revision/{id}/revert

### Response samples

- 200
- 400
- 403
- 404
- 500

Content type
application/json
`
{

- "code": 200,
- "message": "Wiki page revision successfully reverted"

}`