HumHub - Content API (1.0.0)

Download OpenAPI specification:

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

Welcome to the HumHub comment module API reference.

Find comments by content

path Parameters
id
required
integer

The primary key of the content

Responses

Response samples

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

Find comments by parent comment

path Parameters
id
required
integer

The primary key of the parent comment

Responses

Response samples

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

Create a comment

query Parameters
contentId
required
integer

The id of the content

parentCommentId
integer

The id of the content

Request Body schema: application/json
required

The comment data

required
object (Comment)

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "id": 14,
  • "contentId": 123,
  • "parentCommentId": 123,
  • "message": "Calvin Klein – Between love and madness lies obsession.",
  • "createdBy": {},
  • "createdAt": "2018-08-09 14:22:03",
  • "commentsCount": 5,
  • "comments": [
    ]
}

Get comment by id

path Parameters
id
required
integer

The id of the comment

Responses

Response samples

Content type
application/json
{
  • "id": 14,
  • "contentId": 123,
  • "parentCommentId": 123,
  • "message": "Calvin Klein – Between love and madness lies obsession.",
  • "createdBy": {},
  • "createdAt": "2018-08-09 14:22:03",
  • "commentsCount": 5,
  • "comments": [
    ]
}

Update a comment by id

path Parameters
id
required
integer

Id of the updated comment

Request Body schema: application/json
required

The comment data

required
object (Comment)

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "id": 14,
  • "contentId": 123,
  • "parentCommentId": 123,
  • "message": "Calvin Klein – Between love and madness lies obsession.",
  • "createdBy": {},
  • "createdAt": "2018-08-09 14:22:03",
  • "commentsCount": 5,
  • "comments": [
    ]
}

Deletes a comment by id

path Parameters
id
required
integer

The id of comment

Responses