时间表 API
所有时间记录 GET /portal/[PORTALID]/projects/[PROJECTID]/logs/ |
添加任务的时间记录 POST /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/logs/ |
更新任务的时间记录 POST /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/logs/[LOGID]/ |
批准任务的时间记录 POST /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/logs/[LOGID]/approval |
删除任务的时间记录 DELETE /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/logs/[LOGID]/ |
添加问题的时间记录 POST /portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/ |
更新问题的时间记录 POST /portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/ |
批准问题的时间记录 POST /portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/approval |
删除问题的时间记录 DELETE /portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/ |
添加一般记录的时间 POST /portal/[PORTALID]/projects/[PROJECTID]/logs/ |
更新一般记录的时间 POST /portal/[PORTALID]/projects/[PROJECTID]/logs/[LOGID]/ |
批准一般记录的时间 POST /portal/[PORTALID]/projects/[PROJECTID]/logs/[LOGID]/approval |
删除一般记录的时间 DELETE /portal/[PORTALID]/projects/[PROJECTID]/logs/[LOGID]/ |
所有时间记录
GET /portal/[PORTALID]/projects/[PROJECTID]/logs/
获取给定项目中的所有时间记录。
请求参数
索引 | 整数型 | 时间记录的索引。 |
范围 | 整数型 | 时间记录的范围。 |
users_list* | 字符串或长整型 | 时间记录的用户必须为全部或用户 ID。对于多个用户,用户 ID 必须由逗号分隔。(全部 - 字符串,用户 ID - 长整型) |
view_type* | 字符串 | 时间表的查看类型必须为天、周或月。 |
日期* | 字符串 [MM-DD-YYYY] | 时间表查看类型的日期。 |
bill_status* | 字符串 | 时间表可计费状态必须为全部或可计费或不可计费。 |
component_type* | 字符串 | 组件的类型必须为任务、问题或一般。 |
样本响应
Status: 200 Success Content Type: application/json;charset=utf-8
{ "timelogs": { "grandtotal": "02:24", "role": "admin", "timelog": { "date": [{ "date_long": 1400223600000, "display_format": "May 16, 2014", "totalhours": "2:00", "buglogs": [{ "id": 170876000001823039, "notes": "", "hours": 2, "minutes": 0, "hour_display": "02:00", "total_minutes": 120, "owner_name": "Patricia Boyle", "bill_status": "Billable", "project": { "id": 170876000000147021, "name": "ERP Phase III" }, "bug": { "id": 170876000001823009, "title": "UI issue in Status text box" }, "link": { "self": { "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/ 170876000000147021/bugs/170876000001823009/logs/170876000001823039/" } } }] }, { "date_long": 1400482800000, "display_format": "May 19, 2014", "totalhours": "0:24", "buglogs": [{ "id": 170876000001850001, "notes": "timesheet log : start time -05-19-2014 02:37 PM end time 05-26-2014 03:01 PM time spent - 0.24", "hours": 0, "minutes": 24, "hour_display": "00:24", "total_minutes": 24, "owner_name": "Patricia Boyle", "bill_status": "Billable", "project": { "id": 170876000000147021, "name": "ERP Phase III" }, "bug": { "id": 170876000001829171, "title": "UI Issue in Gantt" }, "link": { "self": { "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000000147021/ bugs/170876000001829171/logs/170876000001850001/" } } }] }] } } }
添加任务的时间记录
POST /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/logs/
添加时间记录到任务。
请求参数
日期* | 字符串 [MM-DD-YYYY] | 时间表的日期。 |
bill_status* | 字符串 | 时间表可计费状态必须为可计费或不可计费。 |
小时* | 字符串 [hh:mm] | 时间表的时间段。 |
备注 | 字符串 | 有关时间记录的附加信息。 |
样本响应
Status: 201 Created Content Type: application/json;charset=utf-8
{ "timelogs": { "tasklogs": [{ "task": { "id": 170876000001217302, "name": "Author scope of the guide" }, "id": 170876000001849051, "notes": "", "log_date": "05-26-2014 11:59 PM", "log_date_long": 1401157799000, "hours": 1, "minutes": 30, "hours_display": "01:30", "total_minutes": 90, "owner_id": "2060758", "owner_name": "Patricia Boyle", "bill_status": "Billable", "link": { "self": { "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000000147021/tasks/ 170876000001217302/logs/170876000001849051/" } } }] } }
更新任务的时间记录
POST /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/logs/[LOGID]/
更新任务的时间记录
请求参数
日期* | 字符串 [MM-DD-YYYY] | 时间表的日期。 |
bill_status* | 字符串 | 时间表可计费状态必须为可计费或不可计费。 |
小时* | 字符串 [hh:mm] | 时间表的时间段。 |
备注 | 字符串 | 有关时间记录的附加信息。 |
样本响应
Status: 200 Success Content Type: application/json;charset=utf-8
{ "timelogs": { "tasklogs": [{ "task": { "id": 170876000001217302, "name": "Author scope of the guide" }, "id": 170876000001849051, "notes": "", "log_date": "05-26-2014 11:59 PM", "log_date_long": 1401157799000, "hours": 2, "minutes": 30, "hours_display": "02:30", "total_minutes": 150, "owner_id": "2060758", "owner_name": "Patricia Boyle", "bill_status": "Billable", "link": { "self": { "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000000147021/tasks/ 170876000001217302/logs/170876000001849051/" } } }] } }
批准任务的时间记录
POST /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/logs/[LOGID]/approval
批准任务的时间记录。
请求参数
批准 | 字符串 | 如果给定的值为批准,则批准该时间记录。 |
样本响应
Status: 200 Success Content Type: application/json;charset=utf-8
{ "timelogs": { "tasklogs": [{ "task": { "id": 170876000001217302, "name": "Author scope of the guide" },
"approval_status": "Approved", "id": 170876000001849051, "notes": "", "log_date": "05-26-2014 11:59 PM", "log_date_long": 1401157799000, "hours": 2, "minutes": 30, "hours_display": "02:30", "total_minutes": 150, "owner_id": "2060758", "owner_name": "Patricia Boyle", "bill_status": "Billable", "link": { "self": { "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000000147021/tasks/ 170876000001217302/logs/170876000001849051/" } } }]
删除任务的时间记录
DELETE /portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/logs/[LOGID]/
删除任务的时间记录。
样本响应
Status: 200 Success Content Type: application/json;charset=utf-8
{ "response": "Timesheet log Deleted Successfully" }
添加问题的时间记录
POST /portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/
添加时间记录到问题。
请求参数
日期* | 字符串 [MM-DD-YYYY] | 时间表的日期。 |
bill_status* | 字符串 | 时间表可计费状态必须为可计费或不可计费。 |
小时* | 字符串 [hh:mm] | 时间表的时间段。 |
备注 | 字符串 | 有关时间记录的附加信息。 |
样本响应
Status: 201 Created Content Type: application/json;charset=utf-8
{ "timelogs": { "buglogs": [{ "bug": { "id": 170876000001829171, "name": "UI Issue in Gantt" }, "id": 170876000001849055, "notes": "", "log_date": "05-26-2014 11:59 PM", "log_date_long": 1401157799000, "hours": 2, "minutes": 30, "hours_display": "02:30", "total_minutes": 150, "owner_id": "2060758", "owner_name": "Patricia Boyle", "bill_status": "Billable", "link": { "self": { "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/ 170876000000147021/bugs/170876000001829171/logs/170876000001849055/" } } }] } }
更新问题的时间记录
POST /portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/
更新问题的时间记录。
请求参数
日期* | 字符串 [MM-DD-YYYY] | 时间表的日期。 |
bill_status* | 字符串 | 时间表可计费状态必须为可计费或不可计费。 |
小时* | 字符串 [hh:mm] | 时间表的时间段。 |
备注 | 字符串 | 有关时间记录的附加信息。 |
样本响应
Status: 200 Success Content Type: application/json;charset=utf-8
{ "timelogs": { "buglogs": [{ "bug": { "id": 170876000001829171, "name": "UI Issue in Gantt" }, "id": 170876000001849055, "notes": "", "log_date": "05-26-2014 11:59 PM", "log_date_long": 1401157799000, "hours": 3, "minutes": 30, "hours_display": "03:30", "total_minutes": 210, "owner_id": "2060758", "owner_name": "Patricia Boyle", "bill_status": "Billable", "link": { "self": { "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/ 170876000000147021/bugs/170876000001829171/logs/170876000001849055/" } } }] } }
批准问题的时间记录
POST /portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/approval
批准问题的时间记录。
请求参数
批准 | 字符串 | 如果给定的值为批准,则批准该时间记录。 |
样本响应
Status: 200 Success Content Type: application/json;charset=utf-8
{ "timelogs": { "buglogs": [{ "bug": { "id": 170876000001829171, "name": "UI Issue in Gantt" }, "approval_status": "Approved" "id": 170876000001849055, "notes": "", "log_date": "05-26-2014 11:59 PM", "log_date_long": 1401157799000, "hours": 3, "minutes": 30, "hours_display": "03:30", "total_minutes": 210, "owner_id": "2060758", "owner_name": "Patricia Boyle", "bill_status": "Billable", "link": { "self": { "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/ 170876000000147021/bugs/170876000001829171/logs/170876000001849055/" } } }] } }
删除问题的时间记录
DELETE /portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/
删除问题的时间记录。
样本响应
Status: 200 Success Content Type: application/json;charset=utf-8
{ "response": "Timesheet log Deleted Successfully" }
添加一般记录的时间
POST /portal/[PORTALID]/projects/[PROJECTID]/logs/
添加时间记录到其他任务。
请求参数
名称* | 字符串 | 其他任务的名称。 |
日期* | 字符串 [MM-DD-YYYY] | 时间表的日期。 |
bill_status* | 字符串 | 时间表可计费状态必须为可计费或不可计费。 |
小时* | 字符串 [hh:mm] | 时间表的时间段。 |
备注 | 字符串 | 有关时间记录的附加信息。 |
样本响应
Status: 201 Created Content Type: application/json;charset=utf-8
{ "timelogs": { "generallogs": [{ "id": 170876000001849059, "name": "Client Call", "notes": "", "log_date": "05-26-2014 11:59 PM", "log_date_long": 1401157799000, "hours": 2, "minutes": 30, "hours_display": "02:30", "total_minutes": 150, "owner_id": "2060758", "owner_name": "Patricia Boyle", "bill_status": "Billable", "link": { "self": { "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/ 170876000000147021/logs/170876000001849059/" } } }] } }
更新一般记录的时间
POST /portal/[PORTALID]/projects/[PROJECTID]/logs/[LOGID]/
更新其他任务的时间记录。
请求参数
名称* | 字符串 | 其他任务的名称。 |
日期* | 字符串 [MM-DD-YYYY] | 时间表的日期。 |
bill_status* | 字符串 | 时间表可计费状态必须为可计费或不可计费。 |
小时* | 字符串 [hh:mm] | 时间表的时间段。 |
备注 | 字符串 | 有关时间记录的附加信息。 |
样本响应
Status: 200 Success Content Type: application/json;charset=utf-8
{ "timelogs": { "generallogs": [{ "id": 170876000001849059, "name": "Client Call", "notes": "", "log_date": "05-26-2014 11:59 PM", "log_date_long": 1401157799000, "hours": 2, "minutes": 30, "hours_display": "02:30", "total_minutes": 150, "owner_id": "2060758", "owner_name": "Patricia Boyle", "bill_status": "Billable", "link": { "self": { "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/ 170876000000147021/logs/170876000001849059/" } } }] } }
批准一般记录的时间
POST /portal/[PORTALID]/projects/[PROJECTID]/logs/[LOGID]/approval
批准一般时间记录。
请求参数
批准 | 字符串 | 如果给定的值为批准,则批准该时间记录。 |
样本响应
Status: 200 Success Content Type: application/json;charset=utf-8
{ "timelogs": { "generallogs": [{ "approval_status": "Approved" "id": 170876000001849059, "name": "Client Call", "notes": "", "log_date": "05-26-2014 11:59 PM", "log_date_long": 1401157799000, "hours": 2, "minutes": 30, "hours_display": "02:30", "total_minutes": 150, "owner_id": "2060758", "owner_name": "Patricia Boyle", "bill_status": "Billable", "link": { "self": { "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/ 170876000000147021/logs/170876000001849059/" } } }] } }
删除一般记录的时间
DELETE /portal/[PORTALID]/projects/[PROJECTID]/logs/[LOGID]/
删除其他任务的时间记录。
样本响应
Status: 200 Success Content Type: application/json;charset=utf-8
{ "response": "Timesheet log Deleted Successfully" }