Timer API

Purpose

This API is used to start a new timer, to resume/pause an existing timer, to get current running timer, to add comments for the timer, delete comments for the timer and to get comments for the timer.

Start timer API

This API is used to start a new timer.

Request URL:

http://people.zoho.com/people/api/timetracker/timer?authtoken=<authtoken>&user=<user>&workDate= <workDate>&jobId=<jobId>&timer=<timer>&workItem= <workItem>&dateFormat=<dateFormat>&billingStatus=<billingStatus>&description= <description>

Request parameter:

authtokenSpecify the authentication token
userSpecify all or ERECNO or Email-ID or Employee-ID
workDateSpecify the work date
workItemSpecify the work item
jobIdSpecify the job Id
timerSpecify as start
billingStatusSpecify the billing status as billable or non-billable
descriptionSpecify the description
dateFormatSpecify the date format

Example URL:

http://people.zoho.com/people/api/timetracker/timer?authtoken=28ac426a249678c8867a0d93bb373912&user=charless.stones%2Bsguru1%40zohocorp.com&jobName=Testigapi&workDate=2015-01-05&timer=start&billingStatus=Billable

XML response:

<response uri="/api/timetracker/timer">
<status>0</status>
<message>Timelog entry added Successfully</message>
<result>
<timeLogId>281496000000484021</timeLogId>
</result>
</response>

JSON response:

{ "response": { "message": "Timelog entry added Successfully", "result": [ { "timeLogId": "281496000000484027" } ], "status": 0, "uri": "/api/timetracker/timer" } }

Pause/Resume timer API

This API is used to resume/pause an existing timer.

Request URL:

http://people.zoho.com/people/api/timetracker/timer?authtoken=<authtoken>&timeLogId=<timeLogId>&timer=<timer>

Request parameter:

authtokenSpecify the authentication token
timeLogIdSpecify the time log Id
timerSpecify start or stop

Example URL:

http://people.zoho.com/people/api/timetracker/timer?authtoken=28ac426a249678c8867a0d93bb373912&timeLogId=281496000000264017&timer=start

XML response:

<response uri="/api/timetracker/timer">
<status>0</status>
<message>Timer Paused successfully</message>
<result>null</result>
</response>

JSON response:

{ "response": { "message": "Timer Paused successfully", "status": 0, "uri": "/api/timetracker/timer" } }

Get current running timer API

This API is used to get the current running timer.

Request URL:

http://people.zoho.com/people/api/timetracker/getcurrentlyrunningtimer?authtoken=<authtoken>&dateFormat=<dateFormat>

Request parameter:

authtokenSpecify the authentication token
dateFormatSpecify the date format

Example URL:

http://people.zoho.com/people/api/timetracker/getcurrentlyrunningtimer?authtoken=28ac426a249678c8867a0d93bb373912&dateFormat=yyyy-MM-dd

XML response:

<response uri="/api/timetracker/getcurrentlyrunningtimer">
<status>0</status>
<message>Running Timer information fetched successfully</message>
<result>
<timer>
<timerId>281496000000484031</timerId>
<workDate>2015-05-18</workDate>
<jobId>281496000000479001</jobId>
<diff>313</diff>
<hours>0</hours>
<employeename>guru F</employeename>
<fromTime>41855</fromTime>
<totaltime>0</totaltime>
<date>42168</date>
<billingStatus>billable</billingStatus>
<jobName>Testigapi</jobName>
<timelogId>281496000000484027</timelogId>
</timer>
</result>
</response>

JSON response:

{ "response": { "message": "Running Timer information fetched successfully", "result": { "timerId": "281496000000484031", "workDate": "2015-05-18", "jobId": "281496000000479001", "diff": 414, "hours": 0, "employeename": "guru F", "fromTime": 41855, "totaltime": 0, "date": 42269, "billingStatus": "billable", "jobName": "Testigapi", "timelogId": "281496000000484027" }, "status": 0, "uri": "/api/timetracker/getcurrentlyrunningtimer" } }

Get comments for timer API

This API is used to get comments for the timer API.

Request URL:

http://people.zoho.com/people/api/timetracker/getcomments?authtoken=<authtoken>&timeLogId=<timeLogId>

Request parameter:

authtokenSpecify the authentication token
timeLogIdSpecify the time log Id

Example URL:

https://people.zoho.com/people/api/timetracker/getcomments?authtoken=1408d03bff741277ec9465eca625d390&timeLogId=177402000000936001

XML response:

<response uri="/api/timetracker/getcomments">
<status>0</status>
<message>Timer Comments fetched successfully</message>
<result>
<Comment>
<createdTime>12:06:14</createdTime>
<comment>Completed testing the security issues.</comment>
<commentId>177402000000936007</commentId>
</Comment>
<Comment>
<createdTime>12:06:55</createdTime>
<comment>Notified the issues to the Reporting Manager</comment>
<commentId>177402000000936009</commentId>
</Comment>
</result>
</response>

JSON response:

{ "response": { "message": "Timer Comments fetched successfully", "result": [ { "createdTime": "12:06:14", "comment": "Completed testing the security issues.", "commentId": "177402000000936007" }, { "createdTime": "12:06:55", "comment": "Notified the issues to the Reporting Manager", "commentId": "177402000000936009" } ], "status": 0, "uri": "/api/timetracker/getcomments" } }

Add comment for timer API

This API is used to add comments for the timer API.

Request URL:

http://people.zoho.com/people/api/timetracker/addcomment?authtoken=<authtoken>&timeLogId=<timeLogId>&comment=<comment>

Request parameter:

authtokenSpecify the authentication token
timeLogIdSpecify the time log Id
commentSpecify the comment

Example URL:

people/api/timetracker/addcomment?authtoken=745bd43eff7a164a02bad52f0011fd35&timeLogId=293141000000147001&comment=charless

XML response:

<response uri="/api/timetracker/addcomment">
<status>0</status>
<message>Timer Comment Added successfully</message>
<result>
<commentId>293141000000144061<commentId>
</result>
</response>

JSON response:

{ "response": { "message": "Timer Comment Added successfully", "result": [ { "commentId": "293141000000144059" } ], "status": 0, "uri": "/api/timetracker/addcomment" } }

Delete comment for timer API

This API is used to delete comments for the timer API.

Request URL:

http://people.zoho.com/people/api/timetracker/deletecomment?authtoken=<authtoken>&commentId=<commentId>

Request parameter:

authtokenSpecify the authentication token
commentIdSpecify the comment Id

Example URL:

https://people.zoho.com/people/api/timetracker/deletecomment?authtoken=745bd43eff7a164a02bad52f0011fd35&commentId=293141000000144053

XML response:

<response uri="/api/timetracker/deletecomment">
<status>0</status>
<message>Timer Comment deleted successfully</message>
<result>
<commentId>293141000000144061<commentId>
</result>
</response>

JSON response:

{ "response": { "message": "Timer Comment deleted successfully", "status": 0, "uri": "/api/timetracker/deletecomment" } }