Projects

Projects API

Scope: ZohoProjects.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  /portal/[PORTALID]/projects/
Project Details
GET  /portal/[PORTALID]/projects/[PROJECTID]/
Get Project Custom Fields
Get  /portal/[PORTALID]/projects/customfields/
Get Project Groups
Get  /portal/[PORTALID]/projects/groups
Create a Project
POST  /portal/[PORTALID]/projects/
Update a Project
POST /portal/[PORTALID]/projects/[PROJECTID]/
Delete a Project
DELETE  /portal/[PORTALID]/projects/[PROJECTID]/

All Projects

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

GET  /portal/[PORTALID]/projects/

Scope: ZohoProjects.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
last_modified_timeLongLast updated time of the project in millis.
reverse_orderBooleanSpecify true to sort the projects in reverse order. Accepted values: true and false.
json_stringjson object

Filter projects based on groups and assignee. Specify the group ID values(Long) in group and user ID values(Long) in assignee. 

Ex. { "filter" : {"group" : ["4000000026067","0"] , "assignee" : ["5629101","5629231"] } }

"0" is specified in group to filter ungrouped projects. 

Status: 200 Success

Content Type: application/json;charset=utf-8
{
  "projects": [
    {
      "end_date": "04-25-2019",
      "is_strict": "no",
      "project_percent": "0",
      "role": "admin",
      "bug_count": {
        "closed": 0,
        "open": 0
      },
      "IS_BUG_ENABLED": true,
      "budget_value": "0",
      "owner_id": "639283127",
      "taskbug_prefix": "BM1",
      "link": {
        "activity": {
        "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000006477013/activities/"
        },
        "document": {
        "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000006477013/documents/"
        },
        "forum": {
        "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000006477013/forums/"
        }
},
     "custom_status_id": "170876000005348089",
      "milestone_count": {
        "closed": 0,
        "open": 0
      },
      "start_date_long": 1554057000000,
      "updated_date_long": 1556187579443,
      "show_project_overview": false,
      "end_date_long": 1556216999000,
      "task_count": {
        "closed": 0,
        "open": 0
      },
],
"name": "Billing Method",
      "is_public": "no",
      "id_string": "170876000006477013",
      "created_date": "04-25-2019",
      "updated_date": "04-25-2019",
      "bug_prefix": "BM1-I",
      "cascade_setting": {
        "date": false,
        "logHours": false,
        "plan": true,
        "percentage": false,
        "workHours": false
      },
"name": "Website Version 2",
      "is_public": "no",
      "id_string": "170876000001789005",
      "created_date": "04-23-2014",
      "updated_date": "02-26-2019",
      "bug_prefix": "WV2",
      "cascade_setting": {
        "date": false,
        "logHours": false,
        "plan": false,
        "percentage": false,
        "workHours": false
      },
      "layout_details": {
        "task": {
          "name": "Standard Layout",
          "id": "170876000004668011"
        },
        "project": {
          "name": "zp.customfields.defaultlayout",
          "id": "170876000005348008"
        }
      },
      "status": "active"
    }
  ]
}

Project Details

Lists all the details of the project.

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

Scope: ZohoProjects.projects.READ

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
  "projects": [
    {
      "is_strict": "no",
      "project_percent": "0",
      "role": "admin",
      "bug_count": {
        "closed": 0,
        "open": 0
      },
      "IS_BUG_ENABLED": true,
      "budget_value": "250",
      "owner_id": "639283127",
      "taskbug_prefix": "ZS1",
      "link": {
        "activity": {
       "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000006377005/activities/"
        },
        "document": {
       "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000006377005/documents/"
        },
        "forum": {
          "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000006377005/forums/"
        },
        "timesheet": {
          "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000006377005/logs/"
        },
        "task": {
          "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000006377005/tasks/"
        },
"start_date_long": 1570645800000,
      "threshold": "100.000",
      "updated_date_long": 1560335374305,
      "show_project_overview": false,
      "task_count": {
        "closed": 0,
        "open": 4
      },
 "layout_details": {
        "task": {
          "name": "Standard Layout",
          "id": "170876000004668011"
        },
        "project": {
          "name": "zp.customfields.defaultlayout",
          "id": "170876000005348008"
        }
      },
      "status": "active"
    }
  ]
}

Get Project Custom Fields

Gets all the project custom fields.

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

Scope: ZohoProjects.projects.READ

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": [
    {
      "field_id": "UDF_CHAR1",
      "is_visible": true,
      "is_pii": false,
      "is_encrypted": false,
      "default_value": "1",
      "id": "5000000035009",
      "field_type": "single_line",
      "field_name": "Description:"
    }
  ]
}

Get Project Groups

Gets all the project groups.

GET  /portal/[PORTALID]/projects/groups

Scope: ZohoProjects.projects.CREATE

Request Parameters

indexintIndex number of the project.
rangeintRange of the projects.

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
  "groups": [
    {
      "name": "Marketing",
      "id": "4000000026055"
    },
    {
      "name": "Designing",
      "id": "4000000026059"
    },
    {
      "name": "Public Relations",
      "id": "4000000033001"
    }
  ]
}

Create a Project

POST  /portal/[PORTALID]/projects/

Scope: ZohoProjects.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 and 2. (1 = Not strict, 2 = Strict)

<field_id>

ex: UDF_CHAR1

StringThe value of the custom field.
budget_typeintType of your budget. Accepted values 0, 1, and 2. (0 = None, 1 = Based on amount, 2 = Based on hours)
budget_valueFloatSpecify the budget amount or hours based on the selected budget type.
thresholdFloatSpecify the budget threshold limit (Amount or hours).
currencyStringThe default currency of your project. Example: USD, INR, etc.
project_rateFloatSpecify the rate per hour of your project.
fixed_costFloatFixed cost for your project.
billing_methodintMention the billing method for invoicing. Accepted values 1, 2, and 3. (1 = Based on project hours, 2 = Based on staff hours, 3 = Fixed cost for project, 4 = Based on task / issue hours)
group_idLongSpecify the Group ID.
bill_statusStringAcceptable values: Billable and Non billable.
enable_rollupBooleanAccepted values: Yes or No.
publicBooleanAccepted values: Yes or No.

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/"
            },
            "task": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/tasks/"
            },
            "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  /portal/[PORTALID]/projects/[PROJECTID]/

Scope: ZohoProjects.projects.UPDATE

Request Parameters

name*String [100]Name of the project.
ownerLongUser ID.
descriptionStringDescription of the project.
status*StringStatus 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.
budget_typeintType of your budget. Accepted values 0, 1, and 2. (1 = None, 1 = Based on amount, 2 = Based on hours)
budget_valueFloatSpecify the budget amount or hours based on the selected budget type.
thresholdFloatSpecify the budget threshold limit (Amount or hours).
currencyStringThe default currency of your project. Example: USD, INR, etc.
project_rateFloatSpecify the rate per hour of your project.
fixed_costFloatFixed cost for your project.
billing_methodintMention the billing method for invoicing. Accepted values 1, 2, and 3. (1 = Based on project hours, 2 = Based on staff hours, 3 = Fixed cost for project, 4 = Based on task / issue hours)
group_idLongSpecify the Group ID.
bill_statusStringAcceptable values: Billable and Non billable.
enable_rollupBooleanAccepted values: Yes or No.

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/"
            },
            "task": {
                "url": "https://projectsapi.zoho.com/restapi/portal/
                        2063927/projects/170876000001849005/tasks/"
            },
            "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  /portal/[PORTALID]/projects/[PROJECTID]/

Scope: ZohoProjects.projects.DELETE

Sample Response

Status: 200 Success

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

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohoprojects.com