Timesheets API

Scope: ZohoBugTracker.timesheets.{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 Time Logs
GET  /restapi/portal/[PORTALID]/projects/[PROJECTID]/logs/
Add Time Log for a Bug
POST  /restapi/portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/
Update Time Log for a Bug
POST  /restapi/portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/
Approve Time Log for a Bug
POST  /restapi/portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/approval
Delete Time Log for a Bug
DELETE  /restapi/portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/
Approve Time for a General Log
POST  /restapi/portal/[PORTALID]/projects/[PROJECTID]/logs/[LOGID]/approval

 All Time Logs

Gets all the time logs in the given project.

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

Scope: ZohoBugTracker.timesheets.READ

Request Parameters

indexintIndex of the time log.
rangeintRange of the time logs.
users_list*String or LongUser of the time logs must be provided as all or user ID. For multiple users, the user ID must be separated by commas.(all - String, user ID - Long)
view_type*StringView type of the timesheet must be provided as day or week or month.
date*

String

[MM-DD-YYYY]

Date of the timesheet view type.
bill_status*StringTimesheet billable status must be provided as All or Billable or Non Billable.
component_type*StringType of the component must be provided as bug or general.

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
    "timelogs": {
        "date": [
            {
                "date": "12-11-2018",
                "buglogs": [
                    {
                        "created_time_long": 1544436164932,
                        "hours": 1,
                        "notes": "",
                        "owner_name": "John Marsh",
                        "created_time_format": "12-10-2018 03:32:44 PM",
                        "minutes": 0,
                        "total_minutes": 60,
                        "owner_id": "639282842",
                        "approval_status": "Pending",
                        "link": {
                            "self": {
                                "url": "https://bugtracker.zoho.com/restapi/portal/2063927/projects/170876000004154005/bugs/170876000005610047/logs/170876000005850019/"
                            }
                        },
                        "last_modified_date": "12-10-2018",
                        "bill_status": "Billable",
                        "last_modified_time_long": 1544436164932,
                        "last_modified_time_format": "12-10-2018 03:32:44 PM",
                        "bug": {
                            "id_string": "170876000005610047",
                            "id": 170876000005610047,
                            "title": "Leakage in the water line in the fourth floor of A-Block"
                        },
                        "id_string": "170876000005850019",
                        "created_date": "12-10-2018",
                        "id": 170876000005850019,
                        "hours_display": "01:00"
                    },
                    {
                        "created_time_long": 1544434162410,
                        "hours": 1,
                        "notes": "Polished old artifacts",
                        "owner_name": "Helen Collins",
                        "created_time_format": "12-10-2018 02:59:22 PM",
                        "minutes": 0,
                        "total_minutes": 60,
                        "owner_id": "639283127",
                        "approval_status": "Pending",
                        "link": {
                            "self": {
                                "url": "https://bugtracker.zoho.com/restapi/portal/2063927/projects/170876000004154005/bugs/170876000005241097/logs/170876000005850005/"
                            }
                        },
                        "last_modified_date": "12-10-2018",
                        "bill_status": "Billable",
                        "last_modified_time_long": 1544434162410,
                        "last_modified_time_format": "12-10-2018 02:59:22 PM",
                        "bug": {
                            "id_string": "170876000005241097",
                            "id": 170876000005241097,
                            "title": "Restock Polish"
                        },
                        "id_string": "170876000005850005",
                        "created_date": "12-10-2018",
                        "id": 170876000005850005,
                        "hours_display": "01:00"
                    }
                ],
                "display_format": "12-11-2018 12:00:00 AM",
                "date_long": 1544466600000,
                "total_hours": "2:00"
            }
        ],
        "role": "admin",
        "grandtotal": "02:00"
    }
}

 Add Time Log for a Bug

Adds the time log to a bug.

POST  /restapi/portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/

Scope: ZohoBugTracker.timesheets.CREATE

Request Parameters

date*

String

[MM-DD-YYYY]

Date of the timesheet.
ownerLongUser ID.
bill_status*StringTimesheet billable status must be provided as Billable or Non Billable.
hours*

String

[hh:mm]

Time period of the timesheet.
notes

String

Additional information about the time log.

Sample Response

Status: 201 Created

Content Type: application/json;charset=utf-8
{
  "timelogs": {
    "buglogs": [
      {
        "created_time_long": 1534159650174,
        "hours": 5,
        "notes": "",
        "owner_name": "Helen Collins",
        "created_time_format": "08-13-2018 04:27:30 AM",
        "minutes": 0,
        "total_minutes": 300,
        "owner_id": "639283127",
        "approval_status": "Unapproved",
        "link": {
          "self": {
            "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000003055013/bugs/170876000003237035/logs/170876000005413005/"
          }
        },
        "last_modified_date": "08-13-2018",
        "log_date_long": 1531983599000,
        "bill_status": "all",
        "last_modified_time_long": 1534159650174,
        "last_modified_time_format": "08-13-2018 04:27:30 AM",
        "bug": {
          "id_string": "170876000003237035",
          "id": 170876000003237020,
          "title": "I grew up in north Philadelphia. The youngest of  three, I have two older sisters, five and eight years older than me.  In my 35 years of living, I have yet to meet my  \n"
        },
        "log_date": "07-18-2018",
        "id_string": "170876000005413005",
        "id": 170876000005413000,
        "created_date": "08-13-2018",
        "log_date_format": "07-18-2018 11:59:59 PM",
        "hours_display": "05:00"
      }
    ]
  }
}

 Update Time Log for a Bug

Updates the time log for a bug.

POST  /restapi/portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/

Scope: ZohoBugTracker.timesheets.UPDATE

Request Parameters

date*

String

[MM-DD-YYYY]

Date of the timesheet.
ownerLongUser ID.
bill_status*StringTimesheet billable status must be provided as Billable or Non Billable.
hours*

String

[hh:mm]

Time period of the timesheet.
notes

String

Additional information about the time log.

Sample Response

Status: 200 Success

Content Type: application/json;charset=utf-8
{
  "timelogs": {
    "buglogs": [
      {
        "created_time_long": 1534159650174,
        "hours": 5,
        "notes": "",
        "owner_name": "Helen Collins",
        "created_time_format": "08-13-2018 04:27:30 AM",
        "minutes": 0,
        "total_minutes": 300,
        "owner_id": "639283127",
        "approval_status": "Unapproved",
        "link": {
          "self": {
            "url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000003055013/bugs/170876000003237035/logs/170876000005413005/"
          }
        },
        "last_modified_date": "08-13-2018",
        "log_date_long": 1531983599000,
        "bill_status": "billable",
        "last_modified_time_long": 1534159817712,
        "last_modified_time_format": "08-13-2018 04:30:17 AM",
        "bug": {
          "id_string": "170876000003237035",
          "id": 170876000003237020,
          "title": "I grew up in north Philadelphia. The youngest of  three, I have two older sisters, five and eight years older than me.  In my 35 years of living, I have yet to meet my  \n"
        },
        "log_date": "07-18-2018",
        "id_string": "170876000005413005",
        "id": 170876000005413000,
        "created_date": "08-13-2018",
        "log_date_format": "07-18-2018 11:59:59 PM",
        "hours_display": "05:00"
      }
    ]
  }
}

 Approve Time Log for a Bug

Approve time log for a bug.

POST  /restapi/portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/approval

Scope: ZohoBugTracker.timesheets.UPDATE

Request Parameters

approvalStringThe time log is approved if the given value is approve.

Sample Response

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 Time Log for a Bug

Deletes the time log for a bug.

DELETE  /restapi/portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/

Scope: ZohoBugTracker.timesheets.DELETE

Sample Response

Status: 200 Success

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

 Approve Time for a General Log

Approve general time log.

POST  /restapi/portal/[PORTALID]/projects/[PROJECTID]/logs/[LOGID]/approval

Scope: ZohoBugTracker.timesheets.UPDATE

Request Parameters

approvalStringThe time log is approved if the given value is approve.

Sample Response

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/"
                }
            }
        }]
    }
}