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

200

Success

get /wiki
/api/v1/wiki

Response samples

Copy
Expand all Collapse all
{}

Find all wiki pages by container

path Parameters
id
required
integer

ID of content container

query Parameters
topics
string
Example: "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

200

Success

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

Response samples

Copy
Expand all Collapse all
{}

Deletes a wiki pages by container

path Parameters
id
required
integer

The id of content container

Responses

200

Success

404

Not found

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

Response samples

application/json
Copy
Expand all Collapse all
{
  • "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

WikiPage
required
object
WikiPageRevision
required
object
PageEditForm
object

Responses

200

Success

404

Not found

422

Validation failed

500

Internal server error

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

Request samples

application/json
Copy
Expand all Collapse all
{
  • "WikiPage":
    {
    },
  • "WikiPageRevision":
    {
    },
  • "PageEditForm":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{}

Get wiki page by id

path Parameters
id
required
integer

The id of the wiki page

Responses

200

Success

404

Not found

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

Response samples

application/json
Copy
Expand all Collapse all
{}

Update wiki page by id

path Parameters
id
required
integer

The id of the wiki page

Request Body schema: application/json

Wiki page information

WikiPage
required
object
WikiPageRevision
required
object
PageEditForm
object

Responses

200

Success

404

Not found

422

Validation failed

500

Internal server error

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

Request samples

application/json
Copy
Expand all Collapse all
{
  • "WikiPage":
    {
    },
  • "WikiPageRevision":
    {
    },
  • "PageEditForm":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{}

Deletes a wiki page by id

path Parameters
id
required
integer

The id of wiki page

Responses

200

Success

404

Not found

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

Response samples

application/json
Copy
Expand all Collapse all
{
  • "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

200

Success

400

Bad request

404

Not found

500

Internal server error

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

Request samples

application/json
Copy
Expand all Collapse all
{
  • "target_id": 2,
  • "index": 2
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "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

200

Success

400

Bad request

404

Not found

422

Validation failed

500

Internal server error

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

Request samples

application/json
Copy
Expand all Collapse all
{
  • "target": "c1c1c7dc-8197-471b-b5fe-2c12b183623a"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "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

200

Success

404

Not found

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

Response samples

application/json
Copy
Expand all Collapse all
{
  • "total": 76,
  • "page": 1,
  • "pages": 8,
  • "links":
    {
    },
  • "results":
    [
    ]
}

Get revision by id

path Parameters
id
required
integer

The id of the revision

Responses

200

Success

404

Not found

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

Response samples

application/json
Copy
Expand all Collapse all
{
  • "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

200

Success

400

Success

403

Success

404

Not found

500

Internal server error

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

Response samples

application/json
Copy
Expand all Collapse all
{
  • "code": 200,
  • "message": "Wiki page revision successfully reverted"
}