Skip to content

Tasks API

This content is not available in your language yet.

Manage tasks, assignments, and automated workflows in your organization.

List all tasks with optional filtering.

Query Parameters

ParameterTypeDescription
kind[]arrayFilter by task type: maintenance, audit, review.
state[]arrayFilter by state: new, in_progress, done, wont_do.
assignee[]arrayFilter by assignee user IDs.
Terminal window
curl --location GET \
--url "https://YOUR_KORDON_DOMAIN/api/v1/tasks/" \
--header "Authorization: Bearer YOUR-TOKEN"

Example with filters:

Terminal window
curl --location GET \
--url "https://YOUR_KORDON_DOMAIN/api/v1/tasks/?state[]=new&state[]=in_progress" \
--header "Authorization: Bearer YOUR-TOKEN"

Example Response

Status: 200

{
"data": [
{
"id": "10265263-b1ed-4ddc-82a2-a59aee882840",
"assignee": {
"id": "98dcb717-al70-4c89-8246-0bb026wc215b",
"name": "Jaana Manana"
},
"completed_at": "2024-04-13T08:20:41+00:00",
"completion_summary": "",
"created_at": "2024-04-13T07:51:50+00:00",
"description": "<p>This is a description</p>",
"due_at": "2024-04-13T00:00:00+00:00",
"duration": 15,
"frequency": "once",
"instance_id": "8f54babf-397f-4119-b55e-d2fa130916a8",
"is_overdue": false,
"kind": "maintenance",
"labels": [],
"needs_evidence": false,
"next_instance_id": "8f54babf-397f-4119-b55e-d2fa130916a8",
"outcome": "none",
"state": "done",
"taskable": {
"id": "08faa5be-bd0a-41be-826a-37170b645b7d",
"klass": "control",
"title": "Another test control"
},
"title": "One time task for something",
"updated_at": "2024-04-13T08:20:41+00:00"
}
]
}

Get detailed information about a specific task.

Terminal window
curl --location GET \
--url "https://YOUR_KORDON_DOMAIN/api/v1/tasks/task-id-here" \
--header "Authorization: Bearer YOUR-TOKEN"

Create a new task assignment.

Required Parameters:

  • assignee_id - User ID of the task assignee
  • kind - Task type (maintenance, audit, review)
  • frequency - Task frequency
  • due_at - Due date (ISO 8601 format)

Optional Parameters:

  • title - Task title
  • description - Task description (HTML supported)
  • needs_evidence - Whether task requires evidence (boolean)
  • duration - Expected duration in minutes
Terminal window
curl --location POST \
--url "https://YOUR_KORDON_DOMAIN/api/v1/tasks/" \
--header "Authorization: Bearer YOUR-TOKEN" \
--header "Content-Type: application/json" \
--data '{
"title": "My new task",
"assignee_id": "05wa1387-a987-3cyt-y2df-9e41u8569aed",
"kind": "maintenance",
"frequency": "once",
"due_at": "2024-04-13T00:00:00+00:00"
}'

Example Response

Status: 200

{
"data": {
"id": "d477c288-96ff-4b99-9fc4-eb2fb9d86bef",
"assignee": {
"id": "05wa1387-a987-3cyt-y2df-9e41u8569aed",
"name": "Martin Lootus"
},
"completed_at": null,
"completion_summary": null,
"created_at": "2024-08-28T15:03:46+00:00",
"description": null,
"due_at": "2024-04-13T00:00:00+00:00",
"duration": null,
"frequency": "once",
"instance_id": "a02852c4-2b9a-4bd4-a461-61bfb83fc366",
"is_overdue": true,
"kind": "maintenance",
"labels": [],
"needs_evidence": false,
"next_instance_id": "a02852c4-2b9a-4bd4-a461-61bfb83fc366",
"outcome": "none",
"state": "new",
"taskable": {},
"title": "My new task",
"updated_at": "2024-08-28T15:03:46+00:00"
}
}

Update an existing task.

Terminal window
curl --location PATCH \
--url "https://YOUR_KORDON_DOMAIN/api/v1/tasks/task-id-here" \
--header "Authorization: Bearer YOUR-TOKEN" \
--header "Content-Type: application/json" \
--data '{
"title": "Updated task title"
}'

Connect Task to an Item

Connect a task to a specific item (control, asset, vendor, or other object) by updating the taskable_id.

Terminal window
curl --location PATCH \
--url "https://YOUR_KORDON_DOMAIN/api/v1/tasks/task-id-here" \
--header "Authorization: Bearer YOUR-TOKEN" \
--header "Content-Type: application/json" \
--data '{
"task": {
"taskable_id": "1f446819-d85e-4ede-a064-568760e02dde"
}
}'

Example Response

Status: 200

The response will include the full task data with the updated taskable relationship.

{
"data": {
"id": "d477c288-96ff-4b99-9fc4-eb2fb9d86bef",
"taskable": {
"id": "1f446819-d85e-4ede-a064-568760e02dde",
"klass": "control",
"title": "Security Control"
},
...
}
}

Remove a task.

Terminal window
curl --location DELETE \
--url "https://YOUR_KORDON_DOMAIN/api/v1/tasks/task-id-here" \
--header "Authorization: Bearer YOUR-TOKEN"

Available task types:

  • maintenance - Regular maintenance tasks
  • audit - Audit and compliance tasks
  • review - Review and assessment tasks

Available frequencies:

  • once - One-time task
  • weekly - Repeats weekly
  • monthly - Repeats monthly
  • quarterly - Repeats quarterly
  • semi-annual - Repeats twice yearly
  • annual - Repeats yearly

Available task states:

  • new - Newly created task
  • in_progress - Task is being worked on
  • done - Task completed
  • cancelled - Task was cancelled