Skip to content

Milestone

Milestones help you plan the project, decide its various stages, and also serve as landmarks that identify how close a project is on the verge of completion.

Attributes

id (long)
Unique identifier of the milestone

id (long)
Numerical digits which are considered to have larger values.

Example

234759602834500

project (project)read only
Project to which the milestone is associated

project (project)
Indicates the project to which the milestone is associated

Example

{
  "project": {
    "display_id": {
      "display_value": "PJT-131",
      "value": "131"
    },
    "project_code": "test-project_code",
    "id": "2037672456177497",
    "title": "test-title"
  }
}

title (string)
Title of the milestone.

title (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

scheduled_start_time (date)
Denotes the scheduled starting time of the milestone.

scheduled_start_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

scheduled_end_time (date)
Denotes the scheduled ending time of the milestone.

scheduled_end_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

actual_start_time (date)
Denotes the actual starting time of the milestone.

actual_start_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

More Attributes Expand all

actual_end_time (date)

Denotes the actual ending time of the milestone.

actual_end_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

estimated_hours (long)

Denotes the hours planned to complete the milestone

estimated_hours (long)
Numerical digits which are considered to have larger values.

Example

2347

actual_hours (long)

Denotes the actual hours required to complete the milestone

actual_hours (long)
Numerical digits which are considered to have larger values.

Example

2347

projected_end (date)

Denotes the planned due time of the milestone.

projected_end (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

description (html)

Description of the milestone

description (html)
HTML is a text area where html elements can be used.

Example

<b>The content to be displayed</b>

owner (user)

The user to which the milestone is assigned

owner (user)
Indicates the user to which the milestone is assigned

priority (priority)

Priority/importance of the milestone

priority (priority)
Indicates the priority of the milestone

Example

{
  "priority": {
    "name": "test-priority",
    "id": "234567890123456"
  }
}

status (project_status)

Status of the milestone

status (project_status)
Indicates the status of the Milestone

Example

{
  "status": {
    "name": "Open",
    "id": "234567890123456"
  }
}

attachments (attachment)

Attachments present in the milestone

attachments (attachment)
Attachments present in the milestone. A maximum of 50 attachments can only be attached 

Example

{
  "attachments": [
    {
      "content_type": "application/x-unknown-mime-type",
      "size": "36171",
      "file_id": "4001",
      "name": "test_file.txt"
    }
  ]
}

user (user)read only

This attribute holds the ID of user who created the milestone.

user (user)
Indicates the user associated to the Milestone

Example

{
  "user": {
    "name": "test-user",
    "id": "234567890123456"
  }
}

created_time (datetime)read only

Denotes the created time of the milestone. 

created_time (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

index (int)read only

Index of the milestone

index (int)
Numerical digits which are considered to have smaller numbers.

Example

39

Add Milestone

This operation helps you Add milestone. 

Mandatory Fields :- project, title

Url

<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones

Attributes

id (long)
Unique identifier of the milestone

id (long)
Numerical digits which are considered to have larger values.

Example

234759602834500

project (project)read only
Project to which the milestone is associated

project (project)
Indicates the project to which the milestone is associated

Example

{
  "project": {
    "display_id": {
      "display_value": "PJT-131",
      "value": "131"
    },
    "project_code": "test-project_code",
    "id": "2037672456177497",
    "title": "test-title"
  }
}

title (string)
Title of the milestone.

title (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

scheduled_start_time (date)
Denotes the scheduled starting time of the milestone.

scheduled_start_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

scheduled_end_time (date)
Denotes the scheduled ending time of the milestone.

scheduled_end_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

actual_start_time (date)
Denotes the actual starting time of the milestone.

actual_start_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

More Attributes Expand all

actual_end_time (date)

Denotes the actual ending time of the milestone.

actual_end_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

estimated_hours (long)

Denotes the hours planned to complete the milestone

estimated_hours (long)
Numerical digits which are considered to have larger values.

Example

2347

actual_hours (long)

Denotes the actual hours required to complete the milestone

actual_hours (long)
Numerical digits which are considered to have larger values.

Example

2347

projected_end (date)

Denotes the planned due time of the milestone.

projected_end (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

description (html)

Description of the milestone

description (html)
HTML is a text area where html elements can be used.

Example

<b>The content to be displayed</b>

owner (user)

The user to which the milestone is assigned

owner (user)
Indicates the user to which the milestone is assigned

priority (priority)

Priority/importance of the milestone

priority (priority)
Indicates the priority of the milestone

Example

{
  "priority": {
    "name": "test-priority",
    "id": "234567890123456"
  }
}

status (project_status)

Status of the milestone

status (project_status)
Indicates the status of the Milestone

Example

{
  "status": {
    "name": "Open",
    "id": "234567890123456"
  }
}

attachments (attachment)

Attachments present in the milestone

attachments (attachment)
Attachments present in the milestone. A maximum of 50 attachments can only be attached 

Example

{
  "attachments": [
    {
      "content_type": "application/x-unknown-mime-type",
      "size": "36171",
      "file_id": "4001",
      "name": "test_file.txt"
    }
  ]
}

user (user)read only

This attribute holds the ID of user who created the milestone.

user (user)
Indicates the user associated to the Milestone

Example

{
  "user": {
    "name": "test-user",
    "id": "234567890123456"
  }
}

created_time (datetime)read only

Denotes the created time of the milestone. 

created_time (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

index (int)read only

Index of the milestone

index (int)
Numerical digits which are considered to have smaller numbers.

Example

39

$ curl <service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones\
      -X POST\
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
      -H "Content-Type: application/x-www-form-urlencoded"\
      -d input_data='{
  "milestone": {
    "owner": {
      "name": "Lincoln",
      "id": "1883741825469733"
    },
    "description": "test-description",
    "title": "test-title",
    "priority": {
      "name": "High",
      "id": "1968809555410719"
    },
    "scheduled_end_time": {
      "value": "1512974940000"
    },
    "actual_hours": "1605843473064535",
    "actual_end_time": {
      "value": "1512974940000"
    },
    "estimated_hours": "2204084642328588",
    "actual_start_time": {
      "value": "1421988300000"
    },
    "projected_end": {
      "value": "1512974940000"
    },
    "scheduled_start_time": {
      "value": "1421988300000"
    },
    "status": {
      "name": "Open",
      "id": "2058840951375596"
    }
  }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
  "milestone": {
    "owner": {
      "name": "Lincoln",
      "id": "1883741825469733"
    },
    "description": "test-description",
    "title": "test-title",
    "priority": {
      "name": "High",
      "id": "1968809555410719"
    },
    "scheduled_end_time": {
      "value": "1512974940000"
    },
    "actual_hours": "1605843473064535",
    "actual_end_time": {
      "value": "1512974940000"
    },
    "estimated_hours": "2204084642328588",
    "actual_start_time": {
      "value": "1421988300000"
    },
    "projected_end": {
      "value": "1512974940000"
    },
    "scheduled_start_time": {
      "value": "1421988300000"
    },
    "status": {
      "name": "Open",
      "id": "2058840951375596"
    }
  }
};
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: POST
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'
{
  "milestone": {
    "owner": {
      "name": "Lincoln",
      "id": "1883741825469733"
    },
    "description": "test-description",
    "title": "test-title",
    "priority": {
      "name": "High",
      "id": "1968809555410719"
    },
    "scheduled_end_time": {
      "value": "1512974940000"
    },
    "actual_hours": "1605843473064535",
    "actual_end_time": {
      "value": "1512974940000"
    },
    "estimated_hours": "2204084642328588",
    "actual_start_time": {
      "value": "1421988300000"
    },
    "projected_end": {
      "value": "1512974940000"
    },
    "scheduled_start_time": {
      "value": "1421988300000"
    },
    "status": {
      "name": "Open",
      "id": "2058840951375596"
    }
  }
}
'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method post -Body $data -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
  "milestone": {
    "owner": {
      "name": "Lincoln",
      "id": "1883741825469733"
    },
    "description": "test-description",
    "title": "test-title",
    "priority": {
      "name": "High",
      "id": "1968809555410719"
    },
    "scheduled_end_time": {
      "value": "1512974940000"
    },
    "actual_hours": "1605843473064535",
    "actual_end_time": {
      "value": "1512974940000"
    },
    "estimated_hours": "2204084642328588",
    "actual_start_time": {
      "value": "1421988300000"
    },
    "projected_end": {
      "value": "1512974940000"
    },
    "scheduled_start_time": {
      "value": "1421988300000"
    },
    "status": {
      "name": "Open",
      "id": "2058840951375596"
    }
  }
}'''
data = urlencode({"input_data":input_data}).encode()
httprequest = Request(url, headers=headers,data=data, method="POST")
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "milestone": {
    "owner": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "1883741825469733",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "created_time": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "index": "1",
    "description": "test-description",
    "project": {
      "project_code": "test-project_code",
      "id": "2258743870606263",
      "display_id": {
          "display_value": "PJT-131",
          "value": "131"
        },
      "title": "test-title"
    },
    "title": "test-title",
    "priority": {
      "color": "#ffffff",
      "name": "High",
      "id": "1968809555410719"
    },
    "scheduled_end_time": {
      "display_value": "Dec 11, 2017 12:19 PM",
      "value": "1512974940000"
    },
    "actual_hours": "1605",
    "actual_end_time": {
      "display_value": "Dec 11, 2017 12:19 PM",
      "value": "1512974940000"
    },
    "estimated_hours": "2204",
    "id": "2007594064055157",
    "actual_start_time": {
      "display_value": "Jan 23, 2015 10:15 AM",
      "value": "1421988300000"
    },
    "projected_end": {
      "display_value": "Dec 11, 2017 12:19 PM",
      "value": "1512974940000"
    },
    "user": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "2387253526439501",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "scheduled_start_time": {
      "display_value": "Jan 23, 2015 10:15 AM",
      "value": "1421988300000"
    },
    "status": {
      "internal_name": "Open",
      "color": "#ffffff",
      "name": "Open",
      "id": "2058840951375596"
    }
  },
  "response_status": {
    "status_code": 2000,
    "status": "success"
  }
}

Edit Milestone

This operation helps you to update a milestone.

Url

<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}

Attributes

id (long)
Unique identifier of the milestone

id (long)
Numerical digits which are considered to have larger values.

Example

234759602834500

project (project)read only
Project to which the milestone is associated

project (project)
Indicates the project to which the milestone is associated

Example

{
  "project": {
    "display_id": {
      "display_value": "PJT-131",
      "value": "131"
    },
    "project_code": "test-project_code",
    "id": "2037672456177497",
    "title": "test-title"
  }
}

title (string)
Title of the milestone.

title (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

scheduled_start_time (date)
Denotes the scheduled starting time of the milestone.

scheduled_start_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

scheduled_end_time (date)
Denotes the scheduled ending time of the milestone.

scheduled_end_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

actual_start_time (date)
Denotes the actual starting time of the milestone.

actual_start_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

More Attributes Expand all

actual_end_time (date)

Denotes the actual ending time of the milestone.

actual_end_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

estimated_hours (long)

Denotes the hours planned to complete the milestone

estimated_hours (long)
Numerical digits which are considered to have larger values.

Example

2347

actual_hours (long)

Denotes the actual hours required to complete the milestone

actual_hours (long)
Numerical digits which are considered to have larger values.

Example

2347

projected_end (date)

Denotes the planned due time of the milestone.

projected_end (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

description (html)

Description of the milestone

description (html)
HTML is a text area where html elements can be used.

Example

<b>The content to be displayed</b>

owner (user)

The user to which the milestone is assigned

owner (user)
Indicates the user to which the milestone is assigned

priority (priority)

Priority/importance of the milestone

priority (priority)
Indicates the priority of the milestone

Example

{
  "priority": {
    "name": "test-priority",
    "id": "234567890123456"
  }
}

status (project_status)

Status of the milestone

status (project_status)
Indicates the status of the Milestone

Example

{
  "status": {
    "name": "Open",
    "id": "234567890123456"
  }
}

attachments (attachment)

Attachments present in the milestone

attachments (attachment)
Attachments present in the milestone. A maximum of 50 attachments can only be attached 

Example

{
  "attachments": [
    {
      "content_type": "application/x-unknown-mime-type",
      "size": "36171",
      "file_id": "4001",
      "name": "test_file.txt"
    }
  ]
}

user (user)read only

This attribute holds the ID of user who created the milestone.

user (user)
Indicates the user associated to the Milestone

Example

{
  "user": {
    "name": "test-user",
    "id": "234567890123456"
  }
}

created_time (datetime)read only

Denotes the created time of the milestone. 

created_time (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

index (int)read only

Index of the milestone

index (int)
Numerical digits which are considered to have smaller numbers.

Example

39

$ curl <service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}\
      -X PUT\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
      -H "Content-Type: application/x-www-form-urlencoded"\
      -d input_data='{
  "milestone": {
    "owner": {
      "name": "Lincoln",
      "id": "1917227146110820"
    },
    "actual_hours": "1509180478600481",
    "actual_end_time": {
      "value": "1512974940000"
    },
    "estimated_hours": "2080224023838999",
    "description": "test-description",
    "actual_start_time": {
      "value": "1421988300000"
    },
    "projected_end": {
      "value": "1512974940000"
    },
    "title": "test-title",
    "priority": {
      "name": "High",
      "id": "1880869670468201"
    },
    "scheduled_end_time": {
      "value": "1512974940000"
    },
    "scheduled_start_time": {
      "value": "1421988300000"
    },
    "status": {
      "name": "Open",
      "id": "2188683975560801"
    }
  }
}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {
  "milestone": {
    "owner": {
      "name": "Lincoln",
      "id": "1917227146110820"
    },
    "actual_hours": "1509180478600481",
    "actual_end_time": {
      "value": "1512974940000"
    },
    "estimated_hours": "2080224023838999",
    "description": "test-description",
    "actual_start_time": {
      "value": "1421988300000"
    },
    "projected_end": {
      "value": "1512974940000"
    },
    "title": "test-title",
    "priority": {
      "name": "High",
      "id": "1880869670468201"
    },
    "scheduled_end_time": {
      "value": "1512974940000"
    },
    "scheduled_start_time": {
      "value": "1421988300000"
    },
    "status": {
      "name": "Open",
      "id": "2188683975560801"
    }
  }
};
params = {"input_data": input_data};
response = invokeurl
[
    url: url
    type: PUT
    parameters: params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}"
$headers = @{"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
$input_data = @'
{
  "milestone": {
    "owner": {
      "name": "Lincoln",
      "id": "1917227146110820"
    },
    "actual_hours": "1509180478600481",
    "actual_end_time": {
      "value": "1512974940000"
    },
    "estimated_hours": "2080224023838999",
    "description": "test-description",
    "actual_start_time": {
      "value": "1421988300000"
    },
    "projected_end": {
      "value": "1512974940000"
    },
    "title": "test-title",
    "priority": {
      "name": "High",
      "id": "1880869670468201"
    },
    "scheduled_end_time": {
      "value": "1512974940000"
    },
    "scheduled_start_time": {
      "value": "1421988300000"
    },
    "status": {
      "name": "Open",
      "id": "2188683975560801"
    }
  }
}
'@
$data = @{ 'input_data' = $input_data}
$response = Invoke-RestMethod -Uri $url -Method put -Body $data -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{
  "milestone": {
    "owner": {
      "name": "Lincoln",
      "id": "1917227146110820"
    },
    "actual_hours": "1509180478600481",
    "actual_end_time": {
      "value": "1512974940000"
    },
    "estimated_hours": "2080224023838999",
    "description": "test-description",
    "actual_start_time": {
      "value": "1421988300000"
    },
    "projected_end": {
      "value": "1512974940000"
    },
    "title": "test-title",
    "priority": {
      "name": "High",
      "id": "1880869670468201"
    },
    "scheduled_end_time": {
      "value": "1512974940000"
    },
    "scheduled_start_time": {
      "value": "1421988300000"
    },
    "status": {
      "name": "Open",
      "id": "2188683975560801"
    }
  }
}'''
data = urlencode({"input_data":input_data}).encode()
httprequest = Request(url, headers=headers,data=data, method="PUT")
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "milestone": {
    "owner": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "1917227146110820",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "created_time": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "description": "test-description",
    "project": {
      "project_code": "test-project_code",
      "id": "2219954452183780",
      "display_id": {
          "display_value": "PJT-131",
          "value": "131"
        },
      "title": "test-title"
    },
    "title": "test-title",
    "priority": {
      "color": "#ffffff",
      "name": "High",
      "id": "1880869670468201"
    },
    "scheduled_end_time": {
      "display_value": "Dec 11, 2017 12:19 PM",
      "value": "1512974940000"
    },
    "actual_hours": "1509",
    "actual_end_time": {
      "display_value": "Dec 11, 2017 12:19 PM",
      "value": "1512974940000"
    },
    "estimated_hours": "2080",
    "id": "2275566041957989",
    "actual_start_time": {
      "display_value": "Jan 23, 2015 10:15 AM",
      "value": "1421988300000"
    },
    "projected_end": {
      "display_value": "Dec 11, 2017 12:19 PM",
      "value": "1512974940000"
    },
    "user": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "1758116307267370",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "scheduled_start_time": {
      "display_value": "Jan 23, 2015 10:15 AM",
      "value": "1421988300000"
    },
    "status": {
      "internal_name": "Open",
      "color": "#ffffff",
      "name": "Open",
      "id": "2188683975560801"
    }
  },
  "response_status": {
    "status_code": 2000,
    "status": "success"
  }
}

Get Milestone

This operation helps you Get milestone.

Url

<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}

Attributes

id (long)
Unique identifier of the milestone

id (long)
Numerical digits which are considered to have larger values.

Example

234759602834500

project (project)read only
Project to which the milestone is associated

project (project)
Indicates the project to which the milestone is associated

Example

{
  "project": {
    "display_id": {
      "display_value": "PJT-131",
      "value": "131"
    },
    "project_code": "test-project_code",
    "id": "2037672456177497",
    "title": "test-title"
  }
}

title (string)
Title of the milestone.

title (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

scheduled_start_time (date)
Denotes the scheduled starting time of the milestone.

scheduled_start_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

scheduled_end_time (date)
Denotes the scheduled ending time of the milestone.

scheduled_end_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

actual_start_time (date)
Denotes the actual starting time of the milestone.

actual_start_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

More Attributes Expand all

actual_end_time (date)

Denotes the actual ending time of the milestone.

actual_end_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

estimated_hours (long)

Denotes the hours planned to complete the milestone

estimated_hours (long)
Numerical digits which are considered to have larger values.

Example

2347

actual_hours (long)

Denotes the actual hours required to complete the milestone

actual_hours (long)
Numerical digits which are considered to have larger values.

Example

2347

projected_end (date)

Denotes the planned due time of the milestone.

projected_end (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

description (html)

Description of the milestone

description (html)
HTML is a text area where html elements can be used.

Example

<b>The content to be displayed</b>

owner (user)

The user to which the milestone is assigned

owner (user)
Indicates the user to which the milestone is assigned

priority (priority)

Priority/importance of the milestone

priority (priority)
Indicates the priority of the milestone

Example

{
  "priority": {
    "name": "test-priority",
    "id": "234567890123456"
  }
}

status (project_status)

Status of the milestone

status (project_status)
Indicates the status of the Milestone

Example

{
  "status": {
    "name": "Open",
    "id": "234567890123456"
  }
}

attachments (attachment)

Attachments present in the milestone

attachments (attachment)
Attachments present in the milestone. A maximum of 50 attachments can only be attached 

Example

{
  "attachments": [
    {
      "content_type": "application/x-unknown-mime-type",
      "size": "36171",
      "file_id": "4001",
      "name": "test_file.txt"
    }
  ]
}

user (user)read only

This attribute holds the ID of user who created the milestone.

user (user)
Indicates the user associated to the Milestone

Example

{
  "user": {
    "name": "test-user",
    "id": "234567890123456"
  }
}

created_time (datetime)read only

Denotes the created time of the milestone. 

created_time (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

index (int)read only

Index of the milestone

index (int)
Numerical digits which are considered to have smaller numbers.

Example

39

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}\
      -X GET\
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
      -H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};          
response = invokeurl
[
    url: url
    type: GET
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}  
$response = Invoke-RestMethod -Uri $url -Method get -Headers $headers 
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers)
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "milestone": {
    "owner": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "1687086235738552",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "created_time": {
      "display_value": "Nov 10, 2016 11:44 AM",
      "value": "1478758440000"
    },
    "index": "1",
    "description": "test-description",
    "project": {
      "project_code": "test-project_code",
      "id": "1756859190465457",
      "display_id": {
          "display_value": "PJT-131",
          "value": "131"
        },
      "title": "test-title"
    },
    "title": "test-title",
    "priority": {
      "color": "#ffffff",
      "name": "High",
      "id": "1565020314525803"
    },
    "scheduled_end_time": {
      "display_value": "Dec 11, 2017 12:19 PM",
      "value": "1512974940000"
    },
    "actual_hours": "2432",
    "actual_end_time": {
      "display_value": "Dec 11, 2017 12:19 PM",
      "value": "1512974940000"
    },
    "estimated_hours": "1665",
    "id": "1883508829397770",
    "actual_start_time": {
      "display_value": "Jan 23, 2015 10:15 AM",
      "value": "1421988300000"
    },
    "projected_end": {
      "display_value": "Dec 11, 2017 12:19 PM",
      "value": "1512974940000"
    },
    "user": {
      "email_id": "lincoln@zmail.com",
      "is_technician": false,
      "sms_mail": "linc123@xys_sms.co",
      "phone": "test-phone",
      "name": "Lincoln",
      "mobile": "test-mobile",
      "id": "1600235035377645",
      "photo_url": "test-photo_url",
      "is_vip_user": false
    },
    "scheduled_start_time": {
      "display_value": "Jan 23, 2015 10:15 AM",
      "value": "1421988300000"
    },
    "status": {
      "internal_name": "Open",
      "color": "#ffffff",
      "name": "Open",
      "id": "2204987464829442"
    }
  },
  "response_status": {
    "status_code": 2000,
    "status": "success"
  }
}

Get List Milestone

This operation helps you get all milestones.

Url

<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones

Attributes

id (long)
Unique identifier of the milestone

id (long)
Numerical digits which are considered to have larger values.

Example

234759602834500

project (project)read only
Project to which the milestone is associated

project (project)
Indicates the project to which the milestone is associated

Example

{
  "project": {
    "display_id": {
      "display_value": "PJT-131",
      "value": "131"
    },
    "project_code": "test-project_code",
    "id": "2037672456177497",
    "title": "test-title"
  }
}

title (string)
Title of the milestone.

title (string)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

scheduled_start_time (date)
Denotes the scheduled starting time of the milestone.

scheduled_start_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

scheduled_end_time (date)
Denotes the scheduled ending time of the milestone.

scheduled_end_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

actual_start_time (date)
Denotes the actual starting time of the milestone.

actual_start_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

More Attributes Expand all

actual_end_time (date)

Denotes the actual ending time of the milestone.

actual_end_time (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

estimated_hours (long)

Denotes the hours planned to complete the milestone

estimated_hours (long)
Numerical digits which are considered to have larger values.

Example

2347

actual_hours (long)

Denotes the actual hours required to complete the milestone

actual_hours (long)
Numerical digits which are considered to have larger values.

Example

2347

projected_end (date)

Denotes the planned due time of the milestone.

projected_end (date)
Represents a date as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

description (html)

Description of the milestone

description (html)
HTML is a text area where html elements can be used.

Example

<b>The content to be displayed</b>

owner (user)

The user to which the milestone is assigned

owner (user)
Indicates the user to which the milestone is assigned

priority (priority)

Priority/importance of the milestone

priority (priority)
Indicates the priority of the milestone

Example

{
  "priority": {
    "name": "test-priority",
    "id": "234567890123456"
  }
}

status (project_status)

Status of the milestone

status (project_status)
Indicates the status of the Milestone

Example

{
  "status": {
    "name": "Open",
    "id": "234567890123456"
  }
}

attachments (attachment)

Attachments present in the milestone

attachments (attachment)
Attachments present in the milestone. A maximum of 50 attachments can only be attached 

Example

{
  "attachments": [
    {
      "content_type": "application/x-unknown-mime-type",
      "size": "36171",
      "file_id": "4001",
      "name": "test_file.txt"
    }
  ]
}

user (user)read only

This attribute holds the ID of user who created the milestone.

user (user)
Indicates the user associated to the Milestone

Example

{
  "user": {
    "name": "test-user",
    "id": "234567890123456"
  }
}

created_time (datetime)read only

Denotes the created time of the milestone. 

created_time (datetime)
Represents a date/time as a JSON Object. Would contain the value and the display_value attributes.

value : The time in long format (No. of milliseconds from Jan 1, 1970 ).

display_value : The time in a readable form in a format as personalized by the user. If not personalized, default format would be used.

index (int)read only

Index of the milestone

index (int)
Numerical digits which are considered to have smaller numbers.

Example

39

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones\
      -X GET\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
      -H "Content-Type: application/x-www-form-urlencoded"\
      --data-urlencode input_data='{}'
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
input_data = {};
params = {"input_data":input_data};           
response = invokeurl
[
    url: url
    type: GET
    parameters:params
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$input_data = @'{}'@
$data = @{ 'input_data' = $input_data}    
$response = Invoke-RestMethod -Uri $url -Method get -Body $data -Headers $headers 
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
input_data = '''{}'''       
url += "?" + urlencode({"input_data":input_data})
httprequest = Request(url, headers=headers)
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": [
    {
      "status_code": 2000,
      "status": "success"
    }
  ],
  "list_info": {
    "has_more_rows": false,
    "row_count": 1
  },
  "milestones": [
    {
      "owner": {
        "email_id": "lincoln@zmail.com",
        "is_technician": false,
        "sms_mail": "linc123@xys_sms.co",
        "phone": "test-phone",
        "name": "Lincoln",
        "mobile": "test-mobile",
        "id": "2379150127220924",
        "photo_url": "test-photo_url",
        "is_vip_user": false
      },
      "created_time": {
        "display_value": "Nov 10, 2016 11:44 AM",
        "value": "1478758440000"
      },
      "index": "1",
      "description": "test-description",
      "project": {
        "project_code": "test-project_code",
        "id": "1685000622838068",
        "display_id": {
          "display_value": "PJT-131",
          "value": "131"
        },
        "title": "test-title"
      },
      "title": "test-title",
      "priority": {
        "color": "#ffffff",
        "name": "High",
        "id": "1868121205491555"
      },
      "scheduled_end_time": {
        "display_value": "Dec 11, 2017 12:19 PM",
        "value": "1512974940000"
      },
      "actual_hours": "1957",
      "actual_end_time": {
        "display_value": "Dec 11, 2017 12:19 PM",
        "value": "1512974940000"
      },
      "estimated_hours": "1633",
      "id": "1833218547112732",
      "actual_start_time": {
        "display_value": "Jan 23, 2015 10:15 AM",
        "value": "1421988300000"
      },
      "projected_end": {
        "display_value": "Dec 11, 2017 12:19 PM",
        "value": "1512974940000"
      },
      "user": {
        "email_id": "lincoln@zmail.com",
        "is_technician": false,
        "sms_mail": "linc123@xys_sms.co",
        "phone": "test-phone",
        "name": "Lincoln",
        "mobile": "test-mobile",
        "id": "2285184419024507",
        "photo_url": "test-photo_url",
        "is_vip_user": false
      },
      "scheduled_start_time": {
        "display_value": "Jan 23, 2015 10:15 AM",
        "value": "1421988300000"
      },
      "status": {
        "internal_name": "Open",
        "color": "#ffffff",
        "name": "Open",
        "id": "1609552020899191"
      }
    }
  ]
}

Delete Milestone

This operation helps you to delete a milestone.

Url

<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}

$ curl <service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}\
      -X DELETE\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
      -H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
response = invokeurl
[
    url: url
    type: DELETE
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$response = Invoke-RestMethod -Uri $url -Method delete -Headers $headers
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers,method="DELETE")
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": {
    "status_code": 2000,
    "status": "success"
  }
}

Get Milestone Timesheet

This operation helps you Get milestone timesheet.

Url

<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}/_timesheet

$ curl -G <service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}/_timesheet\
      -X GET\ 
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
      -H "Content-Type: application/x-www-form-urlencoded"
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}/_timesheet";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "application/x-www-form-urlencoded",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
response = invokeurl
[
    url: url
    type: GET
    headers: headers
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}/_timesheet"
$headers = @{ "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "application/x-www-form-urlencoded"}
$response = Invoke-RestMethod -Uri $url -Method get -Headers $headers 
$response
#Python version - 3.8
#This script requires requests module installed in python.
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import urlopen,Request

url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}/_timesheet"
headers ={"Accept": "application/vnd.manageengine.sdp.v3+json", 
          "Authorization" : "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx", 
          "Content-Type" : "application/x-www-form-urlencoded"}
httprequest = Request(url, headers=headers)
try:
    with urlopen(httprequest) as response:
        print(response.read().decode())
except HTTPError as e:
    print(e.read().decode())
{
  "timesheet": [
    {
      "owner": {
        "photo-url": "test-photo-url",
        "name": "Charles",
        "id": "1256498736565975",
        "email": "charles@zmail.com"
      },
      "total_tech_charge": "10.00",
      "total_time_spent": {
        "hours": "02",
        "minutes": "20"
      },
      "total_amount_spent": "18.23",
      "total_other_charge": "3.00"
    }
  ],
  "response_status": {
    "status_code": 2000,
    "status": "success"
  }
}

Add Attachment To A Milestone

This operation helps you to Add attachment to a milestone. Here, the input must be given as multipart - form data.

Mandatory Fields :- filename

Url

<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}/_uploads

Attributes

filename (FILE)
The path of the file to be uploaded must be given with ’@’ at the beginning of the path.

filename (FILE)
The name of the file that is upload.

Example

test-document.txt

addtoattachment (BOOLEAN)
Denotes whether to add the file as an attachment to the associated entity.

addtoattachment (BOOLEAN)
Boolean value which can have two possible values.

Example

True or False

files (FILES)
The details of the file is contained here.
show attribute

files (FILES)
Contains the information about the file that has been uploaded.

Example

{
  "size": "601",
  "content_type": "application/unknown-mime-type",
  "file_id": "6003",
  "name": "test-document.txt",
  "content_url": "<file path>"
  "id": "17322245500049868"
}

size (LONG)
The size of the file that is uploaded.

size (LONG)
Numerical digits which are considered to have larger values

Example

234759602834500

content_type (STRING)
The type of the content of the file.

content_type (STRING)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

file_id (LONG)
The file_id is used to add that file as an attachment to the entity

file_id (LONG)
Numerical digits which are considered to have larger values

Example

234759602834500

name (STRING)
The name of the file.

name (STRING)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

content_url (STRING)
The url of the file that is uploaded.

content_url (STRING)
A text in a plain format. No rich text or new line characters allowed.

Example

Sample Content

$ curl <service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}/_uploads\
      -X POST\
      -H "Accept: application/vnd.manageengine.sdp.v3+json"\
      -H "Authorization: Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"\
      -H "Content-Type: multipart/form-data"\
      -F "filename=@local_file_path" -F "addtoattachment=true"\
// Deluge Sample script
url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}/_uploads";
headers = {"Accept":"application/vnd.manageengine.sdp.v3+json",
           "Content-Type": "multipart/form-data",
           "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"};
file_list = List();
param1 = {"paramName":"filename", "content":"local_file_path"};   
file_list.add(param1);                 
response = invokeurl
[
    url: url
    type: POST
    headers: headers
    files: file_list 
];
info response;
#Powershell version - 5.1
$url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}/_uploads"
$filePath = "local_file_path"                    
$addtoattachment = "true"

$boundary = [System.Guid]::NewGuid().ToString()
$headers = @{
    "Accept" = "application/vnd.manageengine.sdp.v3+json"
    "Authorization" = "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx"
    "Content-Type" = "multipart/form-data; boundary=`"$boundary`""
}

$content = [System.Text.Encoding]::GetEncoding('iso-8859-1').GetString([System.IO.File]::ReadAllBytes($filePath))
$body = (
    "--$boundary",
    "Content-Disposition: form-data; name=`"addtoattachment`"`r`n",
    "$addtoattachment",
    "--$boundary",
    "Content-Disposition: form-data; name=`"filename`"; filename=`"$(Split-Path $filePath -Leaf)`"",
    "Content-Type: $([System.Web.MimeMapping]::GetMimeMapping($filePath))`r`n",
    $content,
    "--$boundary--`r`n"
) -join "`r`n"
$response = Invoke-RestMethod -Uri $url -Method post -Headers $headers -Body $body
$response
#Python version - 3.10
from urllib.error import HTTPError
from urllib.request import Request,urlopen
import mimetypes
import ntpath
import uuid

url = "<service domain|custom domain>/app/<portal>/api/v3/projects/{project_id}/milestones/{milestone_id}/_uploads"
file_path = "local_file_path"
add_to_attachments = "true"

boundary = uuid.uuid4()
headers = {
    "Content-Type": f"multipart/form-data; boundary={boundary}",
    "Accept": "application/vnd.manageengine.sdp.v3+json",
    "Authorization": "Zoho-oauthtoken 1000.7xxx98976ab0xxxxxx19901e7551be57.bxxxx921ed64c04f79622bebcfxxxxxx",
}

with open(file_path, "rb") as f:
    content = f.read()
body = (
    bytes(f'--{boundary}\r\nContent-Disposition: form-data; name="addtoattachment"\r\n\r\n{add_to_attachments}\r\n', "utf-8")
    + bytes(f'--{boundary}\r\nContent-Disposition: form-data; name="filename"; filename="{ntpath.basename(file_path)}"\r\nContent-Type: {mimetypes.guess_type(file_path)[0] or "application/octet-stream"}\r\n\r\n', "utf-8")
    + content
    + bytes(f"\r\n--{boundary}--", "utf-8")
)

httprequest = Request(url, data=body, headers=headers)
try:
    with urlopen(httprequest) as response:
        print(response.read().decode("utf-8"))
except HTTPError as e:
    print(e.read().decode())
{
  "response_status": [
    {
      "status_code": 2000,
      "status": "success"
    }
  ],
  "files": [
    {
      "content_type": "application/zip",
      "size": "36171",
      "file_id": "4001",
      "name": "test_file.txt",
      "content_url": "/projects/3421234312443123/milestones/4123312432431431/_uploads/4001"
    }
  ]
}