Skip to main content
Skip table of contents

Tasks

Contents

List Tasks

List all tasks. For more information see Tasks document model.

Endpoint:

URL

/api/v2/tasks/

Method

GET

Expected response code

200

Expected response type

JSON

Example:

BASH
curl -v \
    -H "Authorization: apikey $API_USER:$API_KEY" \
    $COREDATA_BASE_URL/api/v2/tasks/

Example response:

Task list JSON
JSON
{
    "meta": {
        "limit": 20,
        "next": null,
        "offset": 0,
        "previous": null,
        "total_count": 1
    },
    "objects": [
        {
            "aspects": {},
            "associated_contacts_id": [],
            "associated_users": [],
            "connected_users": [
                "Administrator"
            ],
            "contacts": [],
            "created": "2023-10-30T19:16:33",
            "created_by": "Administrator Administrator",
            "description": "",
            "due_date": "2012-01-03",
            "dynatype": {
                "caption_plural": "dynatypes_labels:Task_plural:",
                "caption_singular": "dynatypes_labels:Task_singular:",
                "id": "6e5d6050-7758-11ee-a909-5334252fa727",
                "title": "Task"
            },
            "id": "d6abb06c-7758-11ee-873f-bf996ef088af",
            "modified": "2023-10-30T19:16:34",
            "modified_by": "Administrator Administrator",
            "path": "/domain/spaces/Spaces/Space title/Projects/Project title/tasks/Task title",
            "project": {
                "id": "d436664c-7758-11ee-afa0-0b58e3bd32e6",
                "identifier": "2023-2",
                "title": "Project title"
            },
            "resource_uri": "/api/v2/tasks/d6abb06c-7758-11ee-873f-bf996ef088af/",
            "responsible_users": [],
            "snapshot_id": "d6fd567e-7758-11ee-b86c-874e503dd3a1",
            "space": {
                "id": "ccdaa098-7758-11ee-a909-1397b0b24186",
                "title": "Space title"
            },
            "status": "task_status:In_progress:",
            "status_message": null,
            "tags": [],
            "template": null,
            "title": "Task title",
            "type": "Task",
            "version": "0.2"
        }
    ]
}

List Favourite Tasks

See User home | List-favourite-Tasks.

Get Task details

Get details of a task.

Endpoint:

URL

/api/v2/tasks/$task_id/

Method

GET

Expected response code

200

Expected response type

JSON

URL parameters:

  • task_id – ID of an existing task.

Example:

BASH
task_id=d6abb06c-7758-11ee-873f-bf996ef088af

curl -v \
    -H "Authorization: apikey $API_USER:$API_KEY" \
    $COREDATA_BASE_URL/api/v2/tasks/$task_id/

Example response:

Task details JSON
JSON
{
    "aspects": {},
    "associated_contacts_id": [],
    "associated_users": [],
    "connected_users": [
        "Administrator"
    ],
    "contacts": [],
    "created": "2023-10-30T19:16:33",
    "created_by": "Administrator Administrator",
    "description": "",
    "due_date": "2012-01-03",
    "dynatype": {
        "caption_plural": "dynatypes_labels:Task_plural:",
        "caption_singular": "dynatypes_labels:Task_singular:",
        "id": "6e5d6050-7758-11ee-a909-5334252fa727",
        "title": "Task"
    },
    "id": "d6abb06c-7758-11ee-873f-bf996ef088af",
    "modified": "2023-10-30T19:16:34",
    "modified_by": "Administrator Administrator",
    "path": "/domain/spaces/Spaces/Space title/Projects/Project title/tasks/Task title",
    "project": {
        "id": "d436664c-7758-11ee-afa0-0b58e3bd32e6",
        "identifier": "2023-2",
        "title": "Project title"
    },
    "resource_uri": "/api/v2/tasks/d6abb06c-7758-11ee-873f-bf996ef088af/",
    "responsible_users": [],
    "snapshot_id": "d6fd567e-7758-11ee-b86c-874e503dd3a1",
    "space": {
        "id": "ccdaa098-7758-11ee-a909-1397b0b24186",
        "title": "Space title"
    },
    "status": "task_status:In_progress:",
    "status_message": null,
    "tags": [],
    "template": null,
    "title": "Task title",
    "type": "Task",
    "version": "0.2"
}

Create Task in a Project

Create a new task.

Endpoint:

URL

/api/v2/tasks/

Method

POST

Content-Type

application/json

Expected response code

201

Request body contains a JSON with the following fields:

Field

Type

Description

Mandatory

project

String

ID (in UUID format) of the project the task should be created in.

Yes

title

String

Title of the task to be created.

Yes

status

String

Task status. Examples: task_status:Pending:, task_status:In Progress:, task_status:Closed:.

No

status_message

String

Task status message.

No

due_date

String

Task's due date in format YYYY-MM-DD.

No

description

String

Task's description.

No

tags

List[String]

List of tags.

No

responsible_users

List[String]

A list of responsible users.

No

associated_users

List[String]

A list of associated users.

No

contacts

List[String]

A list of contact IDs.

No

aspects

JSON

Same as for Project creation. See aspect field description in Projects | Create-Project.

No

Example:

BASH
project_id=ad2e105c-77c8-11ee-aeee-13451b1d7d84
title="New task"

curl -v \
    -X POST \
    -H "Authorization: apikey $API_USER:$API_KEY" \
    -H "Content-Type: application/json" \
    -d "{\"project\": \"$project_id\", \"title\": \"$title\"}" \
    $COREDATA_BASE_URL/api/v2/tasks/

Where:

  • project_id – ID of an existing project to create task in;

  • title – title of the new task.

The response has Location header which contains URL of the newly created task with the task ID:

CODE
Location: /api/v2/tasks/f7a82da8-77e5-11ee-999b-d7b89143b3a1/

Update Task

Update an existing task.

Endpoint:

URL

/api/v2/tasks/$task_id/

Method

PUT

Content-Type

application/json

Expected response code

204

URL parameters:

  • task_id – ID of an existing task to update.

Request body contains a JSON with the fields described in Create Task in a Project section above.

Example:

BASH
task_id=f7a82da8-77e5-11ee-999b-d7b89143b3a1
title="Updated task"

curl -v \
    -X PUT \
    -H "Authorization: apikey $API_USER:$API_KEY" \
    -H "Content-Type: application/json" \
    -d "{\"title\": \"$title\"}" \
    $COREDATA_BASE_URL/api/v2/tasks/$task_id/

Delete Task

Delete an existing task.

Endpoint:

URL

/api/v2/tasks/$task_id/

Method

DELETE

Expected response code

204

URL parameters:

  • task_id – ID of an existing task to delete.

Example:

BASH
task_id=f7a82da8-77e5-11ee-999b-d7b89143b3a1

curl -v \
    -X DELETE \
    -H "Authorization: apikey $API_USER:$API_KEY" \
    $COREDATA_BASE_URL/api/v2/tasks/$task_id/

List Tasks in a Project

List tasks in an existing project.

Endpoint:

URL

/api/v2/projects/$project_id/tasks/

Method

GET

Expected response code

200

Expected response type

JSON

URL parameters:

  • project_id – ID of an existing project to get tasks from.

Example:

BASH
project_id=ad2e105c-77c8-11ee-aeee-13451b1d7d84

curl -v \
    -H "Authorization: apikey $API_USER:$API_KEY" \
    $COREDATA_BASE_URL/api/v2/projects/$project_id/tasks/

Example response:

Project's Task list JSON
JSON
{
    "meta": {
        "limit": 20,
        "next": null,
        "offset": 0,
        "previous": null,
        "total_count": 1
    },
    "objects": [
        {
            "aspects": {},
            "associated_contacts_id": [],
            "associated_users": [],
            "connected_users": [
                "Administrator"
            ],
            "contacts": [],
            "created": "2023-10-30T19:16:33",
            "created_by": "Administrator Administrator",
            "description": "",
            "due_date": "2012-01-03",
            "dynatype": {
                "caption_plural": "dynatypes_labels:Task_plural:",
                "caption_singular": "dynatypes_labels:Task_singular:",
                "id": "6e5d6050-7758-11ee-a909-5334252fa727",
                "title": "Task"
            },
            "id": "d6abb06c-7758-11ee-873f-bf996ef088af",
            "modified": "2023-10-30T19:16:34",
            "modified_by": "Administrator Administrator",
            "path": "/domain/spaces/Spaces/Space title/Projects/Project title/tasks/Task title",
            "project": {
                "id": "ad2e105c-77c8-11ee-aeee-13451b1d7d84",
                "identifier": "2023-2",
                "title": "Project title"
            },
            "resource_uri": "/api/v2/tasks/d6abb06c-7758-11ee-873f-bf996ef088af/",
            "responsible_users": [],
            "snapshot_id": "d6fd567e-7758-11ee-b86c-874e503dd3a1",
            "space": {
                "id": "ccdaa098-7758-11ee-a909-1397b0b24186",
                "title": "Space title"
            },
            "status": "task_status:In_progress:",
            "status_message": null,
            "tags": [],
            "template": null,
            "title": "Task title",
            "type": "Task",
            "version": "0.2"
        }
    ]
}

Create Comment for a Task

See Comments | Create-Comment.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.