HumHub - Calendar API (1.0.0)

Download OpenAPI specification:Download

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

Welcome to the HumHub calendar module API reference.

Authentication

Bearer

Security Scheme Type JWT

BasicAuth

Security Scheme Type HTTP
HTTP Authorization Scheme basic

Calendar

Find all calendars entries

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": [
    ]
}

Find all calendar entries 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": [
    ]
}

Deletes a calendar entries by container

path Parameters
id
required
integer

The id of content container

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Records successfully deleted!"
}

Calendar entry

Create new calendar entry

path Parameters
id
required
integer

The id of content container

Request Body schema: application/json

Calendar entry information

required
object
required
object
object (Content)

Responses

Request samples

Content type
application/json
{
  • "CalendarEntry": {
    },
  • "CalendarEntryForm": {
    },
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "id": 6,
  • "title": "Space event by API",
  • "description": "Space event by API description",
  • "start_datetime": "2019-02-27 00:00:00",
  • "end_datetime": "2019-02-28 23:59:00",
  • "all_day": 1,
  • "participation_mode": 2,
  • "color": "#6fdbe8",
  • "allow_decline": 1,
  • "allow_maybe": 1,
  • "time_zone": "America/Los_Angeles",
  • "participant_info": "",
  • "closed": 0,
  • "max_participants": null,
  • "content": {}
}

Get calendar entry by id

path Parameters
id
required
integer

The id of the calendar entry

Responses

Response samples

Content type
application/json
{
  • "id": 6,
  • "title": "Space event by API",
  • "description": "Space event by API description",
  • "start_datetime": "2019-02-27 00:00:00",
  • "end_datetime": "2019-02-28 23:59:00",
  • "all_day": 1,
  • "participation_mode": 2,
  • "color": "#6fdbe8",
  • "allow_decline": 1,
  • "allow_maybe": 1,
  • "time_zone": "America/Los_Angeles",
  • "participant_info": "",
  • "closed": 0,
  • "max_participants": null,
  • "content": {}
}

Update calendar entry by id

path Parameters
id
required
integer

The id of the calendar entry

Request Body schema: application/json

Calendar entry information

required
object
required
object
object (Content)

Responses

Request samples

Content type
application/json
{
  • "CalendarEntry": {
    },
  • "CalendarEntryForm": {
    },
  • "content": {
    }
}

Response samples

Content type
application/json
{
  • "id": 6,
  • "title": "Space event by API",
  • "description": "Space event by API description",
  • "start_datetime": "2019-02-27 00:00:00",
  • "end_datetime": "2019-02-28 23:59:00",
  • "all_day": 1,
  • "participation_mode": 2,
  • "color": "#6fdbe8",
  • "allow_decline": 1,
  • "allow_maybe": 1,
  • "time_zone": "America/Los_Angeles",
  • "participant_info": "",
  • "closed": 0,
  • "max_participants": null,
  • "content": {}
}

Delete the calendar entry by id

path Parameters
id
required
integer

The id of calendar entry

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Calendar entry successfully deleted!"
}

Calendar entry management

Attach files to calendar entry

path Parameters
id
required
integer

The id of the calendar entry

Request Body schema: multipart/form-data
files
required
Array of file[ items ]

The files to upload.

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Files successfully uploaded."
}

Remove file from calendar entry

path Parameters
id
required
integer

The id of the calendar entry

fileId
required
string

The id of file to remove.

Responses

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "File successfully removed."
}

Participants

Change the user participant

path Parameters
id
required
integer

The id of the calendar entry

Request Body schema: application/json
type
required
integer <int64>
Enum: 0 1 2 3

Participant type:

  • 1 - decline.
  • 2 - maybe.
  • 3 - accept.
  • 0 - remove from participants.

Responses

Request samples

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

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Participation successfully changed."
}