HumHub - Topic API (1.0.0)

Download OpenAPI specification:Download

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

Welcome to the HumHub topic module API reference.

Authentication

Bearer

Security scheme type: JWT

BasicAuth

Security scheme type: HTTP
HTTP Authorization Scheme basic

Topic

API to access and manage topic information.

Find all topics

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 /topic
/api/v1/topic

Response samples

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

Get topic by id

path Parameters
id
required
integer

The id of topic

Responses

200

Success

404

Not found

get /topic/{id}
/api/v1/topic/{id}

Response samples

Copy
Expand all Collapse all
{
  • "id": 1,
  • "name": "Api topic"
}

Update existing topic

path Parameters
id
required
integer

The id of topic

Request Body schema: application/json

Topic name

name
string

Responses

200

Success

401

Unauthorized

404

Not found

422

Validation failed

500

Internal server error

put /topic/{id}
/api/v1/topic/{id}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "name": "Api topic"
}

Response samples

Copy
Expand all Collapse all
{
  • "id": 1,
  • "name": "Api topic"
}

Delete topic by id

path Parameters
id
required
integer

The id of topic

Responses

200

Success

401

Unauthorized

404

Not found

500

Internal server error

delete /topic/{id}
/api/v1/topic/{id}

Response samples

Copy
Expand all Collapse all
{
  • "code": 200,
  • "message": "Topic successfully deleted!"
}

Get all topics by container

path Parameters
containerId
required
integer

The id of container

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 /topic/container/{containerId}
/api/v1/topic/container/{containerId}

Response samples

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

Create new topic

path Parameters
containerId
required
integer

The id of container

Request Body schema: application/json

Topic info

name
required
string

Responses

200

Success

401

Unauthorized

422

Validation failed

500

Internal server error

post /topic/container/{containerId}
/api/v1/topic/container/{containerId}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "name": "Api topic"
}

Response samples

Copy
Expand all Collapse all
{
  • "id": 1,
  • "name": "Api topic"
}