HumHub - Tasks API (1.0.0)

Download OpenAPI specification:Download

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

Welcome to the HumHub tasks module API reference.

Authentication

Bearer

Security scheme type: JWT

BasicAuth

Security scheme type: HTTP
HTTP Authorization Scheme basic

Tasks

Find all tasks

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

Response samples

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

Find all tasks by container

path Parameters
id
required
integer

ID of content 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

404

Not found

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

Response samples

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

Deletes a tasks by container

path Parameters
id
required
integer

The id of content container

Responses

200

Success

404

Not found

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

Response samples

application/json
Copy
Expand all Collapse all
{
  • "code": 200,
  • "message": "Records successfully deleted!"
}

Task

Create new task

path Parameters
id
required
integer

The id of content container

Request Body schema: application/json

Task information

Task
required
object
TaskForm
required
object

Responses

200

Success

403

Forbidden

404

Not found

422

Validation failed

500

Internal server error

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

Request samples

application/json
Copy
Expand all Collapse all
{
  • "Task":
    {
    },
  • "TaskForm":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": 6,
  • "title": "Space task by API",
  • "description": "Space task by API description",
  • "status": 1,
  • "start_datetime": "2019-02-27 10:00:00",
  • "end_datetime": "2019-02-28 17:59:00",
  • "scheduling": 1,
  • "all_day": 0,
  • "reminders":
    [
    ],
  • "max_users": 0,
  • "color": "string",
  • "task_list":
    {
    },
  • "cal_mode": 1,
  • "review": 1,
  • "created_at": "2020-01-31T16:48:52.275Z",
  • "created_by":
    {},
  • "content":
    {},
  • "percentage": 0,
  • "checklist":
    [
    ],
  • "assigned_users":
    [],
  • "responsible_users":
    []
}

Get task by id

path Parameters
id
required
integer

The id of the task

Responses

200

Success

404

Not found

get /tasks/task/{id}
/api/v1/tasks/task/{id}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": 6,
  • "title": "Space task by API",
  • "description": "Space task by API description",
  • "status": 1,
  • "start_datetime": "2019-02-27 10:00:00",
  • "end_datetime": "2019-02-28 17:59:00",
  • "scheduling": 1,
  • "all_day": 0,
  • "reminders":
    [
    ],
  • "max_users": 0,
  • "color": "string",
  • "task_list":
    {
    },
  • "cal_mode": 1,
  • "review": 1,
  • "created_at": "2020-01-31T16:48:52.275Z",
  • "created_by":
    {},
  • "content":
    {},
  • "percentage": 0,
  • "checklist":
    [
    ],
  • "assigned_users":
    [],
  • "responsible_users":
    []
}

Update task by id

path Parameters
id
required
integer

The id of the task

Request Body schema: application/json

Task information

Task
required
object
TaskForm
required
object

Responses

200

Success

403

Forbidden

404

Not found

422

Validation failed

500

Internal server error

put /tasks/task/{id}
/api/v1/tasks/task/{id}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "Task":
    {
    },
  • "TaskForm":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": 6,
  • "title": "Space task by API",
  • "description": "Space task by API description",
  • "status": 1,
  • "start_datetime": "2019-02-27 10:00:00",
  • "end_datetime": "2019-02-28 17:59:00",
  • "scheduling": 1,
  • "all_day": 0,
  • "reminders":
    [
    ],
  • "max_users": 0,
  • "color": "string",
  • "task_list":
    {
    },
  • "cal_mode": 1,
  • "review": 1,
  • "created_at": "2020-01-31T16:48:52.275Z",
  • "created_by":
    {},
  • "content":
    {},
  • "percentage": 0,
  • "checklist":
    [
    ],
  • "assigned_users":
    [],
  • "responsible_users":
    []
}

Delete the task by id

path Parameters
id
required
integer

The id of the task

Responses

200

Success

404

Not found

delete /tasks/task/{id}
/api/v1/tasks/task/{id}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "code": 200,
  • "message": "Task successfully deleted!"
}

Task management

Change task status

path Parameters
id
required
integer

The id of the task

Request Body schema: application/json
title
integer <int64>
Enum:1 2 3 5

Participant type:

  • 1 - pending.
  • 2 - in progress.
  • 3 - pending review.
  • 5 - completed.

Responses

200

Success

400

Bad request

403

Forbidden

404

Not found

patch /tasks/task/{id}/processed
/api/v1/tasks/task/{id}/processed

Request samples

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

Response samples

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

Revert task

path Parameters
id
required
integer

The id of the task

Request Body schema: application/json
title
integer <int64>
Enum:1 2 3 4

Participant type:

  • 1 - pending.
  • 2 - in progress.
  • 3 - pending review.
  • 4 - completed.

Responses

200

Success

400

Bad request

403

Forbidden

404

Not found

patch /tasks/task/{id}/revert
/api/v1/tasks/task/{id}/revert

Request samples

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

Response samples

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

Attach files to task

path Parameters
id
required
integer

The id of the task

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 /tasks/task/{id}/upload-files
/api/v1/tasks/task/{id}/upload-files

Response samples

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

Remove file from task

path Parameters
id
required
integer

The id of the task

fileId
required
string

The id of file to remove.

Responses

200

Success

403

Forbidden

404

Not found

500

Internal server error

delete /tasks/task/{id}/remove-file/{fileId}
/api/v1/tasks/task/{id}/remove-file/{fileId}

Response samples

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

Task List

Find all task lists by container

path Parameters
id
required
integer

ID of content 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

404

Not found

get /tasks/lists/container/{id}
/api/v1/tasks/lists/container/{id}

Response samples

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

Create new task list

path Parameters
id
required
integer

The id of content container

Request Body schema: application/json

Task list information

TaskList
required
object
TaskListSettings
required
object

Responses

200

Success

404

Not found

422

Validation failed

500

Internal server error

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

Request samples

application/json
Copy
Expand all Collapse all
{
  • "TaskList":
    {
    },
  • "TaskListSettings":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": 9,
  • "name": "Task list name",
  • "contentcontainer_id": 2,
  • "parent_id": 0,
  • "color": "#d1ad0e",
  • "settings":
    {
    }
}

Get task list by id

path Parameters
id
required
integer

The id of the task list

Responses

200

Success

404

Not found

get /tasks/list/{id}
/api/v1/tasks/list/{id}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": 9,
  • "name": "Task list name",
  • "contentcontainer_id": 2,
  • "parent_id": 0,
  • "color": "#d1ad0e",
  • "settings":
    {
    }
}

Update task list by id

path Parameters
id
required
integer

The id of the task list

Request Body schema: application/json

Task list information

TaskList
required
object
TaskListSettings
required
object

Responses

200

Success

404

Not found

422

Validation failed

500

Internal server error

put /tasks/list/{id}
/api/v1/tasks/list/{id}

Request samples

application/json
Copy
Expand all Collapse all
{
  • "TaskList":
    {
    },
  • "TaskListSettings":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": 9,
  • "name": "Task list name",
  • "contentcontainer_id": 2,
  • "parent_id": 0,
  • "color": "#d1ad0e",
  • "settings":
    {
    }
}

Delete the task list by id

path Parameters
id
required
integer

The id of the task list

Responses

200

Success

404

Not found

delete /tasks/list/{id}
/api/v1/tasks/list/{id}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "code": 200,
  • "message": "Task list successfully deleted!"
}