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.

Authentication

Bearer

Security scheme type: JWT

BasicAuth

Security scheme type: HTTP
HTTP Authorization Scheme basic

Find all posts 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

Successful operation

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

Response samples

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

data
required
object (Post)

Responses

200

successful operation

400

Invalid post id supplied

404

Post not found

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

Request samples

application/json
Copy
Expand all Collapse all
{
  • "data":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{}

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

200

Successful operation

get /post
/api/v1/post

Response samples

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

Get post by id

path Parameters
id
required
integer

The id of the post

Responses

200

successful operation

400

Invalid post id supplied

404

Post not found

get /post/{id}
/api/v1/post/{id}

Response samples

application/json
Copy
Expand all Collapse all
{}

Updates a post by id

path Parameters
id
required
integer

The id of post

Responses

200

successful operation

404

Post not found

put /post/{id}
/api/v1/post/{id}

Deletes a post by id

path Parameters
id
required
integer

The id of post

Responses

200

successful operation

404

Post not found

delete /post/{id}
/api/v1/post/{id}