Tasks API

All Tasks
GET  /portal/[PORTALID]/projects/[PROJECTID]/tasks/
Tasks for a Tasklist
GET  /portal/[PORTALID]/projects/[PROJECTID]/tasklists/[TASKLISTID]/tasks/
Task Details
GET  /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/
Create Task
POST  /portal/[PORTALID]/projects/[PROJECTID]/tasks/
Update Task
POST  /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/
Delete Task
DELETE /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/
Create Subtask
POST /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/subtasks/
Get Subtasks
GET /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/subtasks/
Get Comments
GET  /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/comments/
Add Comment
POST  /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/comments/
Delete Comment
DELETE /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/comments/[COMMENTID]/

 All Tasks

GET  /portal/[PORTALID]/projects/[PROJECTID]/tasks/

Gets all the tasks in the given project. It fetches only the main tasks and not the subtasks.

Request Parameters

indexintIndex number of the task.
rangeint

Range of the tasks.

ownerString or Long

Owner of the task must be provided as all or user ID.

(all - String, user ID - Long)

statusStringStatus of the task must be all or completed or notcompleted.
timeStringTime period of the task must be all or overdue or today or tomorrow.
priorityStringPriority of the task must be all or none or low or medium or high.
tasklist_idLongId of the tasklist.

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "tasks": [{
        "id": 170876000000270067,
        "name": "Ledger",
        "completed": true,
        "created_by": "2060758",
        "created_person": "Patricia Boyle",
        "priority": "High",
        "percent_complete": 100,
        "start_date": "01-14-2011 12:00 AM",
        "start_date_long": 1294972200000,
        "end_date": "01-24-2011 12:00 AM",
        "end_date_long": 1295836200000,
        "duration": "11",
        "details": {
            "owners": [{
                "name": "Amritha Agrawal",
                "id": "2063270"
            }]
        },
        "link": {
            "self": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/tasks/170876000000270067/"
            },
            "timesheet": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/tasks/170876000000270067/logs/"
            }
        },
        "tasklist": {
            "id": 170876000000270053,
            "name": "ERP Phase III"
        }
    }]
}

 Tasks for a Tasklist

GET  /portal/[PORTALID]/projects/[PROJECTID]/tasklists/[TASKLISTID]/tasks/

Gets all the tasks in the given tasklist.

Request Parameters

indexintIndex number of the task.
rangeintRange of the tasks.

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "tasks": [{
        "id": 170876000001217298,
        "name": "Fix review comments by SME",
        "completed": true,
        "created_by": "2060758",
        "created_person": "Patricia Boyle",
        "priority": "None",
        "percent_complete": 100,
        "start_date": "09-30-2013 12:00 PM",
        "start_date_long": 1380551400000,
        "end_date": "10-04-2013 09:00 PM",
        "end_date_long": 1380929400000,
        "duration": "49",
        "details": {
            "owners": [{
                "name": "Unassigned"
            }]
        },
        "link": {
            "self": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/tasks/170876000001217298/"
            },
            "timesheet": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/tasks/170876000001217298/logs/"
            }
        }
    }]
}

 Task Details

GET  /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/

Gets all the details for the task.

 

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "tasks": [{
        "id": 170876000001217306,
        "name": "Send for language  review",
        "completed": false,
        "created_by": "2060758",
        "created_person": "Patricia Boyle",
        "priority": "None",
        "percent_complete": 50,
        "start_date": "04-15-2014 10:00 AM",
        "start_date_long": 1397565000000,
        "end_date": "04-24-2014 07:00 PM",
        "end_date_long": 1398375000000,
        "duration": "8",
        "details": {
            "owners": [{
                "name": "Einhard Klein",
                "id": "2060761"
            }]
        },
        "link": {
            "self": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/tasks/170876000001217306/"
            },
            "timesheet": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/tasks/170876000001217306/logs/"
            }
        }
    }]
}

 Create Task

POST  /portal/[PORTALID]/projects/[PROJECTID]/tasks/

Creates a task.

Request Parameters

person_responsibleLongOwner ID of the task. User ID for multiple owners must be separated by commas.
tasklist_idLong ID of the tasklist.
name*String Name of the task.
start_dateString [MM-DD-YYYY] Start date of the task.
end_dateString [MM-DD-YYYY] End date of the task.
duration int Duration of the task.
duration_typeStringDuration of the task type in days or hrs.
priority (None or Low or Medium or High)String Priority of the task must be None or Low or Medium or High.
descriptionStringDescription for the task.
uploaddocFileFile to upload for the task.

Sample Response

Status: 201 Created

Content Type: application/json;charset=utf-8
{
    "tasks": [{
        "id": 170876000001849039,
        "name": "Fix QA comments",
        "completed": false,
        "created_by": "2060758",
        "created_person": "Patricia Boyle",
        "priority": "None",
        "percent_complete": 0,
        "details": {
            "owners": [{
                "name": "Unassigned"
            }]
        },
        "link": {
            "self": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                 170876000000147021/tasks/170876000001849039/"
            },
            "timesheet": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/tasks/170876000001849039/logs/"
            }
        }
    }]
}

 Update Task

POST  /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/

Updates the task in the given project

Request Parameters

person_responsible*LongOwner ID of the task. User ID for multiple owners must be separated by commas.
name*String Name of the task.
start_dateString [MM-DD-YYYY] Start date of the task.
end_dateString [MM-DD-YYYY] End date of the task.
percent_completeintTask completed percentage must be provided in multiple of 10's. [10 to 100]
duration intDuration of the task.
duration_typeStringDuration of the task type in days or hrs.
priority (None or Low or Medium or High) String Priority of the task must be None or Low or Medium or High.
descriptionStringDescription for the task.

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "tasks": [{
        "id": 170876000001849039,
        "name": "Fix QA Comments",
        "completed": false,
        "created_by": "2060758",
        "created_person": "Patricia Boyle",
        "priority": "None",
        "percent_complete": 20,
        "start_date": "05-26-2014 10:00 AM",
        "start_date_long": 1401107400000,
        "end_date": "05-30-2014 07:00 PM",
        "end_date_long": 1401485400000,
        "duration": "5",
        "details": {
            "owners": [{
                "name": "Amritha Agrawal",
                "id": "2063270"
            }]
        },
        "link": {
            "self": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/tasks/170876000001849039/"
            },
            "timesheet": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/tasks/170876000001849039/logs/"
            }
        }
    }]
}

 Delete Task

DELETE /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/

Deletes the tasks in the given project.

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "response": "Task Deleted Successfully"
}

 Create Subtask

POST  /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/subtasks/

Creates a subtask.

Request Parameters

person_responsibleLongOwner ID of the task. User ID for multiple owners must be separated by commas.
name*String Name of the task.
start_dateString [MM-DD-YYYY] Start date of the task.
end_dateString [MM-DD-YYYY] End date of the task.
duration int Duration of the task.
duration_typeStringDuration of the task type in days or hrs.
priority (None or Low or Medium or High)String Priority of the task must be None or Low or Medium or High.
descriptionStringDescription for the task.

Sample Response

Status: 201 Created

Content Type: application/json;charset=utf-8
{
  "tasks": [{
  "created_by": "2060758",
  "created_time_long": 1451974141000,
  "subtasks": false,
  "link": {
  "self": {
  "url": "https://projectsapi.zoho.com/restapi/portal/zillum/projects/
   170876000001865067/tasks/170876000002969005/"
  },
  "timesheet": {
  "url": "https://projectsapi.zoho.com/restapi/portal/zillum/projects/
   170876000001865067/tasks/170876000002969005/logs/"
  }
  },
  "depth": 1,
  "last_updated_time_format": "01-04-2016 10:09:01 PM",
  "last_updated_time_long": 1451974141000,
  "id": 170876000002969005,
  "percent_complete": "0",
  "created_person": "Patricia Boyle",
  "last_updated_time": "01-04-2016",
  "details": {
  "owners": [{
  "name": "Unassigned"
  }]
  },
  "id_string": "170876000002969005",
  "priority": "None",
  "name": "Blog Image",
  "created_time_format": "01-04-2016 10:09:01 PM",
  "created_time": "01-04-2016",
  "completed": false
  }]
}

 Get Subtasks

GET  /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/subtasks/

Gets all the subtasks of the given task.

Request Parameters

indexintIndex number of the subtask.
rangeintRange of the subtasks.

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "tasks": [{
        "created_by": "2060758",
        "subtasks": false,
        "start_date_long": 1408365000000,
        "link": {
            "self": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000001865067/tasks/170876000001868770/"
            },
            "timesheet": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000001865067/tasks/170876000001868770/logs/"
            }
        },
        "tasklist": {
            "id": 170876000001868599,
            "name": "ERP Phase III"
        },
        "depth": 1,
        "end_date_format": "08-19-2014 06:30 AM",
        "id": 170876000001868770,
        "percent_complete": "60",
        "duration": "2",
        "created_person": "Boyle Patricia",
        "end_date": "08-19-2014",
        "details": {
            "owners": [{
                "id": "2060556",
                "name": "Hiyoshi Nakano"
            }, {
                "id": "2060755",
                "name": "Manish Patel"
            }]
        },
        "priority": "None",
        "name": "Work on Finance Budget for this month",
        "end_date_long": 1408483800000,
        "start_date_format": "08-17-2014 09:30 PM",
        "start_date": "08-17-2014",
        "completed": false
    }]
}

 Get Comments

GET  /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/comments/

Gets all the task comment.

Request Parameters

indexintIndex number of the task comment.
rangeintRange of the task comments.

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "comments": [{
        "content": "Projects",
        "id": 57000001124005,
        "created_time_long": 1408625664048,
        "added_by": "2060758",
        "added_person": "Boyle Patricia",
        "created_time_format": "08-20-2014 09:54 PM",
        "created_time": "08-20-2014"
    }, {
        "content": "Check with Sales team",
        "id": 57000001153001,
        "created_time_long": 1411755818829,
        "added_by": "2060758",
        "added_person": "Boyle Patricia",
        "created_time_format": "09-26-2014 03:23 AM",
        "created_time": "09-26-2014"
    }]
}

 Add Comment

POST  /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/comments/

Adds the task comment.

Request Parameters

content*String Comment for the task.

Sample Response

Status: 201 Created

Content Type: application/json;charset=utf-8
{
    "comments": [{
        "content": "Setup Demo Video",
        "id": 57000001149011,
        "created_time_long": 1411756962722,
        "added_by": "2060758",
        "added_person": "Boyle Patricia",
        "created_time_format": "09-26-2014 03:42 AM",
        "created_time": "09-26-2014"
    }]
}

 Delete Comment

DELETE /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/comments/[COMMENTID]/

Deletes the task comment.

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "response": "Comment Deleted Successfully"
}