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

200

Success

get /calendar
/api/v1/calendar

Response samples

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

Success

404

Not found

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

Response samples

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

200

Success

404

Not found

delete /calendar/container/{id}
/api/v1/calendar/container/{id}

Response samples

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

CalendarEntry
required
object
CalendarEntryForm
required
object

Responses

200

Success

403

Forbidden

404

Not found

422

Validation failed

500

Internal server error

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

Request samples

application/json
Copy
Expand all Collapse all
{
  • "CalendarEntry":
    {
    },
  • "CalendarEntryForm":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "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,
  • "recurring": 0,
  • "recurring_type": 0,
  • "recurring_interval": 0,
  • "recurring_end": "string",
  • "color": "#6fdbe8",
  • "allow_decline": 1,
  • "allow_maybe": 1,
  • "time_zone": "America/Los_Angeles",
  • "participant_info": "",
  • "closed": 0,
  • "max_participants": "string",
  • "content":
    {}
}

Get calendar entry by id

path Parameters
id
required
integer

The id of the calendar entry

Responses

200

Success

404

Not found

get /calendar/entry/{id}
/api/v1/calendar/entry/{id}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "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,
  • "recurring": 0,
  • "recurring_type": 0,
  • "recurring_interval": 0,
  • "recurring_end": "string",
  • "color": "#6fdbe8",
  • "allow_decline": 1,
  • "allow_maybe": 1,
  • "time_zone": "America/Los_Angeles",
  • "participant_info": "",
  • "closed": 0,
  • "max_participants": "string",
  • "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

CalendarEntry
required
object
CalendarEntryForm
required
object

Responses

200

Success

403

Forbidden

404

Not found

422

Validation failed

500

Internal server error

put /calendar/entry/{id}
/api/v1/calendar/entry/{id}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "CalendarEntry":
    {
    },
  • "CalendarEntryForm":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "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,
  • "recurring": 0,
  • "recurring_type": 0,
  • "recurring_interval": 0,
  • "recurring_end": "string",
  • "color": "#6fdbe8",
  • "allow_decline": 1,
  • "allow_maybe": 1,
  • "time_zone": "America/Los_Angeles",
  • "participant_info": "",
  • "closed": 0,
  • "max_participants": "string",
  • "content":
    {}
}

Delete the calendar entry by id

path Parameters
id
required
integer

The id of calendar entry

Responses

200

Success

404

Not found

delete /calendar/entry/{id}
/api/v1/calendar/entry/{id}

Response samples

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

The files to upload.

Responses

200

Success

400

Bad Request

404

Not found

500

Internal server error

post /calendar/entry/{id}/upload-files
/api/v1/calendar/entry/{id}/upload-files

Response samples

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

200

Success

403

Forbidden

404

Not found

500

Internal server error

delete /calendar/entry/{id}remove-file/{fileId}
/api/v1/calendar/entry/{id}remove-file/{fileId}

Response samples

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

200

Success

400

Bad request

404

Not found

post /calendar/entry/{id}/respond
/api/v1/calendar/entry/{id}/respond

Request samples

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

Response samples

application/json
Copy
Expand all Collapse all
{
  • "code": 200,
  • "message": "Participation successfully changed."
}