Skip to main content

Tasks API

General notes​

Embeddable fields​

NameTypeDescription
time_reportsTimeReport[]Array of time reports for task TimeReport.
custom_fieldsCustomField[]Array of custom fields for task CustomField.
statusStatusCurrent Status of task.
status_historyarray--
extra_costarray--
report_idsarray--
activity_reportsCollectionCurrent Collection of Time reports.
last_activity_reportActivityReportLast Activity Report.

Content​

Tasks collection:

Single role:

Tasks collection

Tasks index​

This method needs permission access on tasks.

Request​

Index behaviourDefinition
Paginated by defaultNo
Sortingid, name, project_id, goodday_id, parent_id, status_id, description, created_by_employee_id, action_required_by_employee_id, start_date, end_date, deadline_date, billable, priority, estimate, progress, custom_fields, closed_at, goodday_created_at, created_at, updated_at, is_done, status_order, last_activity, project_name
Filtersid:enum, name:string, project_id:int, goodday_id:int, parent_id:int, status_id:int, description:string, created_by_employee_id:int, action_required_by_employee_id:int, start_date:date, end_date:date, deadline_date:date, billable:bool, priority:int, estimate:int, progress:int, closed_at:date, goodday_created_at:date, created_at:date, updated_at:date, last_activity: dateTime, responsible_person_id: int
Embedded-
GET /api/v0/tasks HTTP/1.1
Content-Type: application/json

Response​

200 OK​

GET /api/v0/tasks HTTP/1.1
Content-Type: application/json

{
"items": [
{
"id": 1,
"name": "Collect client requirements zmena",
"project_id": 2,
"goodday_id": "yAD1kC",
"parent_id": null,
"status_id": 18,
"description": null,
"created_by_employee_id": 1,
"assigned_to_employee_id": null,
"action_required_by_employee_id": 1,
"start_date": "2021-07-08",
"end_date": "2021-07-09",
"deadline_date": null,
"billable": true,
"priority": 5,
"estimate": null,
"progress": null,
"closed_at": null,
"goodday_created_at": "2021-07-08T10:40:03+0200",
"created_at": "2022-11-23T16:06:56+0100",
"updated_at": "2022-11-23T16:06:56+0100",
"_links": [
{
"href": "/api/v0/tasks/1",
"rel": "self",
"type": "GET"
}
]
}
]
}


Single task

Task detail​

GET /api/v0/tasks/{task_id}

This method needs permission read on tasks.

Get Task detail.

Request​

Index behaviourDefinition
Embedded-

Request​

GET /api/v0/tasks/1 HTTP/1.1
Content-Type: application/json

Response​

200 OK​

GET /api/v0/tasks/1 HTTP/1.1
Content-Type: application/json

{
"id": 1,
"name": "Collect client requirements zmena",
"project_id": 2,
"goodday_id": "yAD1kC",
"parent_id": null,
"status_id": 18,
"description": null,
"created_by_employee_id": 1,
"assigned_to_employee_id": null,
"action_required_by_employee_id": 1,
"start_date": "2021-07-08",
"end_date": "2021-07-09",
"deadline_date": null,
"billable": true,
"priority": 5,
"estimate": null,
"progress": null,
"closed_at": null,
"goodday_created_at": "2021-07-08T10:40:03+0200",
"created_at": "2022-11-23T16:06:56+0100",
"updated_at": "2022-11-23T16:06:56+0100",
"_links": [
{
"href": "/api/v0/tasks/1",
"rel": "self",
"type": "GET"
}
]
}

404 NOT FOUND​

Task was not found.

GET /api/v0/tasks/2 HTTP/1.1
Content-Type: application/json
Status-Code: 404

{
"type": "NotFound",
"message": "Required model was not found.",
"id": "0cd85449-05fe-4866-9802-8192e6785fc7"
}

Users work time on Task detail​

GET /api/v0/tasks/{task_id}/user-work-times

This method needs permission read on tasks.

Get users work time on Task detail.

Request​

GET /api/v0/tasks/1/user-work-times HTTP/1.1
Content-Type: application/json

Response​

200 OK​

GET /api/v0/tasks/1/user-work-times HTTP/1.1
Content-Type: application/json

{
"work_times": {
"items": [
{
"user_id": 2,
"time": 60
},
{
"user_id": 3,
"time": 360
}
],
"reported_time": 420
}
}

404 NOT FOUND​

Task was not found.

GET /api/v0/tasks/2/user-work-times HTTP/1.1
Content-Type: application/json
Status-Code: 404

{
"type": "NotFound",
"message": "Required model was not found.",
"id": "0cd85449-05fe-4866-9802-8192e6785fc7"
}

Update Task​

PUT/PATCH /api/v0/tasks/{task_id}

This method needs permission update on tasks.

Method for updating Task data.

Request​

ParamTypeDescriptionRequirements
billablebooleanBillable flagSometimes. true for billable. false for not billable

For PATCH method any field can be omitted.

PATCH /api/v0/tasks/1 HTTP/1.1
Content-Type: application/json

{
"billable": true,
}

Response​

200 OK​

Task successfully updated.

PATCH /api/tasks/3 HTTP/1.1
Content-Type: application/json

{
"id": 1,
"name": "1",
"project_id": 2,
"goodday_id": "yAD1kC",
"parent_id": null,
"status_id": 18,
"description": null,
"created_by_employee_id": 1,
"assigned_to_employee_id": null,
"action_required_by_employee_id": 1,
"start_date": "2021-07-08",
"end_date": "2021-07-09",
"deadline_date": null,
"billable": true,
"priority": 5,
"estimate": null,
"progress": null,
"closed_at": null,
"goodday_created_at": "2021-07-08T10:40:03+0200",
"created_at": "2022-11-23T16:06:56+0100",
"updated_at": "2022-11-25T12:40:09+0100",
"_links": [
{
"href": "/api/v0/tasks/1",
"rel": "self",
"type": "GET"
}
]
}

404 NOT FOUND​

Task was not found.

PATCH /api/tasks/2 HTTP/1.1
Content-Type: application/json
Status-Code: 404

{
"type": "NotFound",
"message": "Required model was not found.",
"id": "0cd85449-05fe-4866-9802-8192e6785fc7"
}

422 UNPROCESSABLE ENTITY​

Validation error occurred.

PUT /api/v0/tasks HTTP/1.1
Content-Type: application/json

{
"type" : "ValidationError",
"message" : "The given data was invalid.",
"id" : "fe1b04de-b347-43b5-8118-864c1eefaccf",
"errors": [
{
"field": "name",
"message": "The name field is required."
}
]
}