Projects API

Scope: ZohoBugTracker.projects.{Operation}

Operations: READ, CREATE, UPDATE, DELETE, ALL

Use the ALL operation to gain the scope for all the other operations like READ, CREATE, UPDATE, and DELETE at once.

All Projects
GET  /restapi/portal/[PORTALID]/projects/
Project Details
GET  /restapi/portal/[PORTALID]/projects/[PROJECTID]/
Get Project Custom Fields
Get  /restapi/portal/[PORTALID]/projects/customfields/
Create a Project
POST  /restapi/portal/[PORTALID]/projects/
Update a Project
POST /restapi/portal/[PORTALID]/projects/[PROJECTID]/
Delete a Project
DELETE  /restapi/portal/[PORTALID]/projects/[PROJECTID]/

All Projects

Get all the projects in the portal for the logged in user.

GET  /restapi/portal/[PORTALID]/projects/

Scope: ZohoBugTracker.projects.READ

Request Parameters

indexintIndex number of the project.
rangeintRange of the projects.
statusStringStatus of the project must be active or archived or template
sort_columnStringSort projects using the last modified time or time of creation. (created_time / last_modified_time)
sort_orderStringSort in ascending / descending order

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "projects": [{
        "custom_fields": [{
            "Template design": "Rightnav_temp"
        }, {
            "Promos per second": "2"
        }, {
            "Blog announcement": "02-25-2016"
        }, {
            "Promo publish date": "02-17-2016"
        }, {
            "Content approval": "Amritha Agrawal"
        }],
        "created_date": "02-16-2016",
        "IS_BUG_ENABLED": true,
        "owner_name": "Patricia Boyle",
        "task_count": {
            "open": 0,
            "closed": 0
        },
        "start_date_long": -32401001,
        "status": "active",
        "link": {
            "folder": {
                "url": "https://projectsapi.zoho.com/restapi/portal/zillum/projects/170876000003152069/folders/"
            },
            "milestone": {
                "url": "https://projectsapi.zoho.com/restapi/portal/zillum/projects/170876000003152069/milestones/"
            },
            "forum": {
                "url": "https://projectsapi.zoho.com/restapi/portal/zillum/projects/170876000003152069/forums/"
            },
            "document": {
                "url": "https://projectsapi.zoho.com/restapi/portal/zillum/projects/170876000003152069/documents/"
            },
            "status": {
                "url": "https://projectsapi.zoho.com/restapi/portal/zillum/projects/170876000003152069/statuses/"
            },
            "event": {
                "url": "https://projectsapi.zoho.com/restapi/portal/zillum/projects/170876000003152069/events/"
            },
   
            "bug": {
                "url": "https://projectsapi.zoho.com/restapi/portal/zillum/projects/170876000003152069/bugs/"
            },
            "self": {
                "url": "https://projectsapi.zoho.com/restapi/portal/zillum/projects/170876000003152069/"
            },
            "timesheet": {
                "url": "https://projectsapi.zoho.com/restapi/portal/zillum/projects/170876000003152069/logs/"
            },
            "user": {
                "url": "https://projectsapi.zoho.com/restapi/portal/zillum/projects/170876000003152069/users/"
            },
            "tasklist": {
                "url": "https://projectsapi.zoho.com/restapi/portal/zillum/projects/170876000003152069/tasklists/"
            },
            "activity": {
                "url": "https://projectsapi.zoho.com/restapi/portal/zillum/projects/170876000003152069/activities/"
            }
        },
        "created_date_format": "02-16-2016 03:20:43 AM",
        "workspace_id": "2ea4657bfe29202df4eda90dabc651e61b1d6",
        "milestone_count": {
            "open": 0,
            "closed": 0
        },
        "created_date_long": 1455621643662,
        "end_date_format": "12-31-1969 06:59:59 AM",
        "id": 170876000003152069,
        "end_date": "12-31-1969",
        "id_string": "170876000003152069",
        "description": "fdb df b",
        "name": "Promotional banner for women's day",
        "owner_id": "2060758",
        "end_date_long": -32401001,
        "role": "admin",
        "start_date_format": "12-31-1969 06:59:59 AM",
        "start_date": "12-31-1969"
    }]
}

Project Details

Lists all the details of the project.

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

Scope: ZohoBugTracker.projects.READ

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "projects": [{
        "id": 170876000000765009,
        "task_count": {
            "open": 6,
            "closed": 7
        },
        "milestone_count": {
            "open": 2,
            "closed": 1
        },
        "bug_count": {
            "open": 2,
            "closed": 1
        },
        "name": "Website Design Templates",
        "status": "active",
        "created_date": "10-22-2012 02:45 PM",
        "created_date_long": 1350926134092,
        "description": "This project is to discuss different design templates to build a website",
        "owner_name": "Patricia Boyle",
        "owner_id": "2060758",
        "link": {
            "self": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000000765009/"
            },
            "activity": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000000765009/activities/"
            },
            "status": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000000765009/statuses/"
            },
            "milestone": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000000765009/milestones/"
            },
            "tasklist": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000000765009/tasklists/"
            },
            
            "bug": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000000765009/bugs/"
            },
            "timesheet": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000000765009/logs/"
            },
            "event": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000000765009/events/"
            },
            "document": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000000765009/documents/"
            },
            "folder": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000000765009/folders/"
            },
            "forum": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000000765009/forums/"
            },
            "user": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000000765009/users/"
            }
        }
    }]
}

Get Project Custom Fields

Gets all the project custom fields.

GET  /restapi/portal/[PORTALID]/projects/customfields/

Note:

  • To create projects with custom fields, you need to pass the value received for the field_id in this response. The value that you receive here becomes the param in the Create a Project API.

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "project_custom_fields": [{
        "is_visible": true,
        "field_name": "Supported browser",
        "field_type": "single_line",
        "default_value": "Chrome",
        "field_id": "UDF_CHAR1"
    }, {
        "is_visible": true,
        "field_name": "Due Date",
        "field_type": "date",
        "field_id": "UDF_DATE1"
    }]
}

Create a Project

POST  /restapi/portal/[PORTALID]/projects/

Scope: ZohoBugTracker.projects.CREATE

Request Parameters

name*String [100]Name of the project.
ownerLongZoho user ID. If this param is not set, the user who creates the project will be mapped as the owner by default.
descriptionStringDescription of the project.
template_idLongTemplate ID of the project.
start_dateString [MM-DD-YYYY]Start date of the project.
end_dateString [MM-DD-YYYY]End date of the project.
strict_projectStringThe value for strict projects must be either 1 or 2. (1 = Not strict, 2 = Strict)

<field_id>

ex: UDF_CHAR1

StringThe value of the custom field.

Note:

  • The project custom field feature is available only in the Enterprise plan. The params that you need to pass for the project custom fields is the value in <field_id> in Get Project Custom Fields API.
  • Strict project feature is available only for paid plans.

Example of creating a project with custom fields

Since custom field names are not unique, custom fields are referred by their respective < field_id>. The same custom field name will be referred with different field Ids. 

You must first get all the custom fields, and then pass the <field_id> value of the custom field as a param to create your project with the custom fields.

Here is a sample response of a custom field:

{
     "project_custom_fields": [{
         "is_visible": false,
         "field_name": "Supported browser",
         "field_type": "single_line",
         "default_value": "Chrome",
        "field_id": "UDF_CHAR1"
     }]
}    

UDF_CHAR1 is the param that you need to pass while creating projects. 

Firefox is the value for the "Supported browser" field. 

Notice that the name of the field Supported browser" will not be used anywhere while creating projects.

Sample Response

Status: 201 Created

Content Type: application/json;charset=utf-8
  {
    "projects": [{
        "id": 170876000001849005,
        "task_count": {
            "open": 0,
            "closed": 0
        },
        "milestone_count": {
            "open": 0,
            "closed": 0
        },
        "bug_count": {
            "open": 0,
            "closed": 0
        },
        "name": "SAP Projects",
        "status": "active",
        "created_date": "05-26-2014 10:34 AM",
        "created_date_long": 1401109494737,
        "description": "This project is used to implement end to end SAP for large scale companies.",
        "owner_name": "Patricia Boyle",
        "owner_id": "2060758",
        "link": {
            "self": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/"
            },
            "activity": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/activities/"
            },
            "status": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/statuses/"
            },
            "milestone": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/milestones/"
            },
            "tasklist": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/tasklists/"
            },
            
            "bug": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/bugs/"
            },
            "timesheet": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/logs/"
            },
            "event": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/events/"
            },
            "document": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/documents/"
            },
            "folder": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/folders/"
            },
            "forum": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/forums/"
            },
            "user": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/users/"
            }
        }
    }]
}

Update a Project

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

Scope: ZohoBugTracker.projects.UPDATE

Request Parameters

nameString [100]Name of the project.
ownerLongUser ID.
descriptionStringDescription of the project.
statusStringStatus of the project must be active or archived.
start_dateString [MM-DD-YYYY]Start date of the project.
end_dateString [MM-DD-YYYY]End date of the project.
strict_projectStringThe value for strict projects must be either 1 or 2. (1 = Not strict, 2 = Strict)

<field_id>

ex: UDF_CHAR1

StringThe value of the custom field.

Example of updating a project with custom fields

Since custom field names are not unique, custom fields are referred by their respective < field_id>. The same custom field name will be referred with different field Ids. 

You must first get all the custom fields, and then pass the <field_id> value of the custom field as a param to update your project with the custom fields.

Here is a sample response of a custom field:

{
     "project_custom_fields": [{
         "is_visible": false,
         "field_name": "Supported browser",
         "field_type": "single_line",
         "default_value": "Firefox",
        "field_id": "UDF_CHAR1"
     }]
}    

UDF_CHAR1 is the param that you need to pass while updating projects. 

Chrome is the value for the "Supported browser" field. 

Notice that the name of the field Supported browser" will not be used anywhere while updating projects.

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "projects": [{
        "id": 170876000001849005,
        "task_count": {
            "open": 22,
            "closed": 11
        },
        "milestone_count": {
            "open": 15,
            "closed": 7
        },
        "bug_count": {
            "open": 18,
            "closed": 8
        },
        "name": "SAP Projects",
        "status": "archived",
        "created_date": "05-26-2014 10:34 AM",
        "created_date_long": 1401109494737,
        "description": "The project has been successfully implemented in 100 companies.",
        "owner_name": "Patricia Boyle",
        "owner_id": "2060758",
        "link": {
            "self": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/"
            },
            "activity": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/activities/"
            },
            "status": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/statuses/"
            },
            "milestone": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/milestones/"
            },
            "tasklist": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/tasklists/"
            },
            
            "bug": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/bugs/"
            },
            "timesheet": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/logs/"
            },
            "event": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/events/"
            },
            "document": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/documents/"
            },
            "folder": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/folders/"
            },
            "forum": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/forums/"
            },
            "user": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/users/"
            }
        }
    }]
}  

Delete a Project

DELETE  /restapi/portal/[PORTALID]/projects/[PROJECTID]/

Scope: ZohoBugTracker.projects.DELETE

Sample Response

Status: 200 Success

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