Milestones API

Scope: ZohoProjects.milestones.{Operation}

Operation: READ, CREATE, UPDATE, DELETE, ALL

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

All Milestones 
GET  /restapi/portal/[PORTALID]/projects/[PROJECTID]/milestones/
Milestone Details
GET  /restapi/portal/[PORTALID]/projects/[PROJECTID]/milestones/[MILESTONEID]/
Create Milestone
POST  /restapi/portal/[PORTALID]/projects/[PROJECTID]/milestones/
Update Milestone
POST  /restapi/portal/[PORTALID]/projects/[PROJECTID]/milestones/[MILESTONEID]/
Update Milestone Status 
POST  /restapi/portal/[PORTALID]/projects/[PROJECTID]/milestones/[MILESTONEID]/status/
Delete a Milestone
DELETE /restapi/portal/[PORTALID]/projects/[PROJECTID]/milestones/[MILESTONEID]/
My Milestones 
GET  /restapi/portal/[PORTALID]/milestones

 All Milestones

Get all the milestones in the given project.

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

Scope: ZohoProjects.milestones.READ

Request Parameters

indexintIndex number of the milestone.
rangeintRange of the milestones.
statusStringStatus of the milestone must be all or completed or notcompleted.
display_typeStringMilestone type must be all or upcoming or delayed.
flagStringMilestone flag must be allflag or internal or external.
last_modified_timeLongLast updated time of the milestone.
reverse_orderBooleanAccepted values: true or false.
sort_columnStringSort milestones using the last modified time or time of creation.
sort_orderStringSort in ascending or descending order.
owner/owner_zpuidLong
Specify ZUID of the owner/Specify ZPUID of the owner

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "milestones": [{
        "id": 170876000000262079,
        "link": {
            "self": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/milestones/170876000000262079/"
            },
            "status": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/milestones/170876000000262079/status/"
            }
        },
        "name": "Reports",
        "owner_name": "Jasmine Frank",
        "owner_id": "2060559",
        "flag": "internal",
        "start_date": "01-15-2011 12:00 AM",
        "start_date_long": 1295058600000,
        "end_date": "01-31-2011 11:59 PM",
        "end_date_long": 1296527399000,
        "status": "completed",
        "completed_date": "01-19-2011 01:11 PM",
        "completed_date_long": 1295451703811
    }]
}

 Milestone Details

Get all the details of the milestone.

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

Scope: ZohoProjects.milestones.READ

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "milestones": [{
        "id": 170876000000472001,
        "link": {
            "self": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/milestones/170876000000472001/"
            },
            "status": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/milestones/170876000000472001/status/"
            }
        },
        "name": "Purchasing",
        "owner_name": "Amritha Agrawal",
        "owner_id": "2063270",
        "flag": "internal",
        "start_date": "12-05-2012 12:00 AM",
        "start_date_long": 1354674600000,
        "end_date": "12-12-2016 12:00 AM",
        "end_date_long": 1481509800000,
        "status": "notcompleted"
    }]
}

 Create Milestone

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

Scope: ZohoProjects.milestones.CREATE

Request Parameters

name*String [100]Name of the milestone.
start_date*String [MM-DD-YYYY]Start date of the milestone.
end_date*String [MM-DD-YYYY]End date of the milestone.
owner*/owner_zpuidLongSpecify ZUID of the owner/Specify ZPUID of the owner
flag*StringMilestone flag must be internal or external.
budgetFloatEnter the Cost Budget
thresholdFloat
Enter the Cost Budget Threshold
revenue_budgetFloatSpecify the Revenue Budget

Sample Response

Status: 201 Created

Content Type: application/json;charset=utf-8
{
    "milestones": [{
        "id": 170876000001849021,
        "link": {
            "self": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/milestones/170876000001849021/"
            },
            "status": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/milestones/170876000001849021/status/"
            }
        },
        "name": "Ledgers Report",
        "owner_name": "Amritha Agrawal",
        "owner_id": "2063270",
        "flag": "internal",
        "start_date": "05-26-2014 12:00 AM",
        "start_date_long": 1401071400000,
        "end_date": "05-30-2014 11:59 PM",
        "end_date_long": 1401503399000,
        "status": "notcompleted"
    }]
}

 Update Milestone

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

Scope: ZohoProjects.milestones.UPDATE

Request Parameters

name*String [100]Name of the milestone.
start_date*String [MM-DD-YYYY]Start date of the milestone.
end_date*String [MM-DD-YYYY]End date of the milestone.
owner*/owner_zpuidLongSpecify ZUID of the owner/Specify ZPUID of the owner
flag*StringMilestone flag must be internal or external.
budgetFloatEnter the Cost Budget
thresholdFloatEnter the Cost Budget Threshold
revenue_budgetFloatSpecify the Revenue Budget

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "milestones": [{
        "id": 170876000001849021,
        "link": {
            "self": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/milestones/170876000001849021/"
            },
            "status": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/milestones/170876000001849021/status/"
            }
        },
        "name": "Ledgers Report",
        "owner_name": "Patricia Boyle",
        "owner_id": "2060758",
        "flag": "internal",
        "start_date": "05-26-2014 11:59 PM",
        "start_date_long": 1401157799000,
        "end_date": "05-30-2014 11:59 PM",
        "end_date_long": 1401503399000,
        "status": "notcompleted"
    }]
}

 Update Milestone Status

POST  /restapi/portal/[PORTALID]/projects/[PROJECTID]/milestones/[MILESTONEID]/status/

Scope: ZohoProjects.milestones.UPDATE

Request Parameters

status*int [1 or 2]Modify the status of the milestone.(1 - notcompleted, 2 - completed)

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "milestones": [{
        "id": 170876000001849021,
        "link": {
            "self": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/milestones/170876000001849021/"
            },
            "status": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/milestones/170876000001849021/status/"
            }
        },
        "name": "Ledgers Report",
        "owner_name": "Patricia Boyle",
        "owner_id": "2060758",
        "flag": "internal",
        "start_date": "05-26-2014 11:59 PM",
        "start_date_long": 1401157799000,
        "end_date": "05-30-2014 11:59 PM",
        "end_date_long": 1401503399000,
        "status": "completed",
        "completed_date": "05-26-2014 11:54 AM",
        "completed_date_long": 1401114294966
    }]
}

 Delete Milestone

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

Scope: ZohoProjects.milestones.DELETE

Sample Response

Status: 200 Success

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

 My Milestones

Get all the milestones assigned to a particular user in the given project.

GET  /restapi/portal/[PORTALID]/milestones

Scope: ZohoProjects.milestones.READ

Request Parameters

indexintIndex number of the milestone.
rangeintRange of the milestones.
project_idsJSONArraySpecify any particular project IDs(if any).
statusJSONArraySpecify the milestone status(Accepted values: upcoming / overdue / completed / archived).
flagStringMilestone flag must be allflag or internal or external.
last_modified_timeLongLast updated time of the milestone.
reverse_orderBooleanAccepted values: true or false.
sort_columnStringSort milestones using the last modified time or time of creation.
sort_orderStringSort in ascending or descending order.

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "milestones": [{
        "id": 170876000000262079,
        "link": {
            "self": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/milestones/170876000000262079/"
            },
            "status": {
                "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/
                        170876000000147021/milestones/170876000000262079/status/"
            }
        },
        "name": "Reports",
        "owner_name": "Jasmine Frank",
        "owner_id": "2060559",
        "flag": "internal",
        "start_date": "01-15-2011 12:00 AM",
        "start_date_long": 1295058600000,
        "end_date": "01-31-2011 11:59 PM",
        "end_date_long": 1296527399000,
        "status": "completed",
        "completed_date": "01-19-2011 01:11 PM",
        "completed_date_long": 1295451703811
    }]
}