HumHub - Post API (1.0.0)

Download OpenAPI specification:Download

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

Welcome to the HumHub post module API reference.

Find all posts 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,
  • "pages": 8,
  • "links": {
    },
  • "results": [
    ]
}

Creates a new post

path Parameters
id
required
integer

ID of content container to post to

Request Body schema: application/json

The post

required
object (Post)

Responses

Request samples

Content type
application/json
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "id": 14,
  • "message": "Calvin Klein – Between love and madness lies obsession.",
  • "content": {
    }
}

Find all posts

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,
  • "pages": 8,
  • "links": {
    },
  • "results": [
    ]
}

Get post by id

path Parameters
id
required
integer

The id of the post

Responses

Response samples

Content type
application/json
{
  • "id": 14,
  • "message": "Calvin Klein – Between love and madness lies obsession.",
  • "content": {
    }
}

Updates a post by id

path Parameters
id
required
integer

The id of post

Request Body schema: application/json

The post

required
object (Post)

Responses

Request samples

Content type
application/json
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "id": 14,
  • "message": "Calvin Klein – Between love and madness lies obsession.",
  • "content": {
    }
}

Deletes a post by id

path Parameters
id
required
integer

The id of post

Responses

Upload files to Post by id

path Parameters
id
required
integer

The id of the Post

Request Body schema: multipart/form-data
hiddenInStream
Array of any

Names of the attached files which should be hidden in stream

files
required
Array of file

The files to upload.

Responses

Response samples

Content type
application/json
{}