里程碑 API
所有里程碑 GET /portal/[PORTALID]/projects/[PROJECTID]/milestones/ |
里程碑详情 GET /portal/[PORTALID]/projects/[PROJECTID]/milestones/[MILESTONEID]/ |
创建里程碑 POST /portal/[PORTALID]/projects/[PROJECTID]/milestones/ |
更新里程碑 POST /portal/[PORTALID]/projects/[PROJECTID]/milestones/[MILESTONEID]/ |
更新里程碑状态 POST /portal/[PORTALID]/projects/[PROJECTID]/milestones/[MILESTONEID]/status/ |
删除里程碑 DELETE /portal/[PORTALID]/projects/[PROJECTID]/milestones/[MILESTONEID]/ |
所有里程碑
GET /portal/[PORTALID]/projects/[PROJECTID]/milestones/
获取给定项目中的所有里程碑。
请求参数
索引 | 整数型 | 里程碑的索引号。 |
范围 | 整数型 | 里程碑的范围。 |
状态 | 字符串 | 里程碑的状态必须为全部、已完成、未完成。 |
display_type | 字符串 | 里程碑类型必须为全部、将要进行、已延迟。 |
标记 | 字符串 | 里程碑标记必须为 allflag、内部、外部。 |
样本响应
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 }] }
里程碑详情
GET /portal/[PORTALID]/projects/[PROJECTID]/milestones/[MILESTONEID]/
获取里程碑的详情。
样本响应
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" }] }
创建里程碑
POST /portal/[PORTALID]/projects/[PROJECTID]/milestones/
创建里程碑。
请求参数
名称* | 字符串 [100] | 里程碑的名称。 |
start_date* | 字符串 [MM-DD-YYYY] | 里程碑的开始日期。 |
end_date* | 字符串 [MM-DD-YYYY] | 里程碑的结束日期。 |
所有者* | 长整型 | 项目的用户 ID。 |
标记* | 字符串 | 里程碑标记必须为内部或外部。 |
样本响应
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" }] }
更新里程碑
POST /portal/[PORTALID]/projects/[PROJECTID]/milestones/[MILESTONEID]/
更新里程碑。
请求参数
名称* | 字符串 [100] | 里程碑的名称。 |
start_date* | 字符串 [MM-DD-YYYY] | 里程碑的开始日期。 |
end_date* | 字符串 [MM-DD-YYYY] | 里程碑的结束日期。 |
所有者* | 长整型 | 项目的用户 ID。 |
标记* | 字符串 | 里程碑标记必须为内部或外部。 |
样本响应
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" }] }
更新里程碑状态
POST /portal/[PORTALID]/projects/[PROJECTID]/milestones/[MILESTONEID]/status/
更新里程碑状态。
请求参数
状态* | 整数 [1 或 2] | 修改里程碑的状态。(1 - 未完成,2 - 已完成) |
样本响应
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 /portal/[PORTALID]/projects/[PROJECTID]/milestones/[MILESTONEID]/
删除里程碑。
样本响应
Status: 200 Success Content Type: application/json;charset=utf-8
{ "response": "Milestone Deleted Successfully" }