HumHub - Wiki API (1.0.0)

Download OpenAPI specification:Download

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

Welcome to the HumHub wiki module API reference.

Authentication

Bearer

Security Scheme Type JWT

BasicAuth

Security Scheme Type HTTP
HTTP Authorization Scheme basic

Wiki

Find all wiki pages

query Parameters
page
string >= 0

The number of page of the result set.

limit
string [ 1 .. 50 ]
Default: 20

The numbers of items to return per page.

Responses

Response samples

Content type
{
  • "total": 76,
  • "page": 1,
  • "results": [
    ]
}

Find all wiki pages by container

path Parameters
id
required
integer

ID of content container

query Parameters
topics
string
Example: topics=Music,Dancing

Coma separated list of topics to filter

page
string >= 0

The number of page of the result set.

limit
string [ 1 .. 50 ]
Default: 20

The numbers of items to return per page.

Responses

Response samples

Content type
{
  • "total": 76,
  • "page": 1,
  • "results": [
    ]
}

Deletes a wiki pages by container

path Parameters
id
required
integer

The id of content container

Responses

Response samples

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

Request samples

Content type
application/json
{
  • "WikiPage": {
    },
  • "WikiPageRevision": {
    },
  • "PageEditForm": {
    },
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "id": 201,
  • "title": "Some Wikipage title",
  • "is_home": 1,
  • "admin_only": 1,
  • "is_category": 0,
  • "parent_page_id": null,
  • "latest_revision": {
    },
  • "content": {}
}

Get wiki page by id

path Parameters
id
required
integer

The id of the wiki page

Responses

Response samples

Content type
application/json
{
  • "id": 201,
  • "title": "Some Wikipage title",
  • "is_home": 1,
  • "admin_only": 1,
  • "is_category": 0,
  • "parent_page_id": null,
  • "latest_revision": {
    },
  • "content": {}
}

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

Request samples

Content type
application/json
{
  • "WikiPage": {
    },
  • "WikiPageRevision": {
    },
  • "PageEditForm": {
    },
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "id": 201,
  • "title": "Some Wikipage title",
  • "is_home": 1,
  • "admin_only": 1,
  • "is_category": 0,
  • "parent_page_id": null,
  • "latest_revision": {
    },
  • "content": {}
}

Deletes a wiki page by id

path Parameters
id
required
integer

The id of wiki page

Responses

Response samples

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
target_id
required
integer <int64>

Wiki page category id

index
integer <int64>
Default: 0

Index for order

Responses

Request samples

Content type
application/json
{
  • "target_id": 2,
  • "index": 2
}

Response samples

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
target
required
string

Guid of target space container

Responses

Request samples

Content type
application/json
{
  • "target": "c1c1c7dc-8197-471b-b5fe-2c12b183623a"
}

Response samples

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
string >= 0

The number of page of the result set.

limit
string [ 1 .. 50 ]
Default: 20

The numbers of items to return per page.

Responses

Response samples

Content type
application/json
{
  • "total": 76,
  • "page": 1,
  • "pages": 8,
  • "links": {
    },
  • "results": [
    ]
}

Get revision by id

path Parameters
id
required
integer

The id of the revision

Responses

Response samples

Content type
application/json
{
  • "id": 2424,
  • "revision": 1534454147,
  • "is_latest": 1,
  • "wiki_page_id": 201,
  • "created_by": {},
  • "message": "The wiki page content in markdown."
}

Revert page by revision id

path Parameters
id
required
integer

The id of the revision

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Wiki page revision successfully reverted"
}