API
Below is the list of API endpoints and their description.
Please note that all parameters like email or password must be sent with HTTP POST.
is_timer_active
Returns information whether timer for the current user is active (started) or not.
It can be used to display visual information on the client side like red 'Stop' button in our
windows gadget.
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret" https://mrticktock.com/app/api/is_timer_active
Example response:
{"content":[{"id":"1","user_id":"3047","task_id":"52","is_timer":true}],"errors":[]}
start_timer
It allows to start timer for the given task and current user.
It can be used to start time tracking on the server from the client side like it is in our
windows gadget.
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password | |
task_id | yes | id of task |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret&task_id=966" https://mrticktock.com/app/api/start_timer
Example response:
{"content":{"timer_started":true,"time_minutes":0,"task_time":"0:00"},"errors":[]}
stop_timer
Stops active timer (there can be only one active timer so task_id is not necessary).
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret" https://mrticktock.com/app/api/stop_timer
Example response:
{"content":{"timerange_created":true,"timer_deleted":true,"timerange_id":"1","time_minutes":14,"time_formatted":"0:14","start_time_formatted":"20:51","end_time_formatted":"21:05","task_time":"0:14"},"errors":[]}
create_task
Creates new task in the provided project and with the given name.
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password | |
project_id | yes | id of the project | |
task_name | yes | name of the task | |
return_task_id | no | if set then created task_id will be returned |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret&project_id=18&task_name=test" https://mrticktock.com/app/api/create_task
Example response:
{"content":"Task created.","errors":[]}
report_time_on_task
Reports time against given task.
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password | |
task_id | yes | id of the task | |
time | yes | time worked in format hh:mm | |
date | yes | date in format dd-mm-yyyy |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret&task_id=123&time=1:30&date=12-01-2013" https://mrticktock.com/app/api/report_time_on_task
Example response:
{"content":"Report saved.","errors":[]}
get_customers
Retrieves list of customers.
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret" https://mrticktock.com/app/api/get_customers
Example response:
{{"content":[{"id":"62","customer_name":"Luno Ltd."},{"id":"63","customer_name":"NTZW Inc."}],"errors":[]}
get_projects
Retrieves list of projects.
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret" https://mrticktock.com/app/api/get_projects
Example response:
{"content":[{"id":"124","project_name":"Website","customer_name":"Luno Ltd.","customer_id":"62"},{"id":"133","project_name":"Android app","customer_name":"NTZW Ltd.","customer_id":"63"}],"errors":[]}
get_tasks
Retrieves list of tasks.
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password | |
hidden | no | if set to 'true' then not visible tasks will be also returned | false |
closed | no | if set to 'true' then closed tasks will be also returned | false |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret" https://mrticktock.com/app/api/get_tasks
Example response:
{"content":[{"id":"723","task_name":"Design","closed":"0","project_id":"124","project_name":"Website","customer_id":"63","customer_name":"Luno Ltd.","visibility":"visible"}],"errors":[]}
get_task_details
Retrieves task details (time reported against the task by the user, comment flag, etc.) and day off
information for the current user.
"total_time" in the response equals sum of the time reported and time calculated from active timer (if any)
for the selected day.
"total" means total reported time for the given task by the user in history.
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password | |
task_id | yes | id of the task | |
date | no | defines the day we want to get time report for | today |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret&task_id=723" https://mrticktock.com/app/api/get_task_details
Example response:
{"content":{"id":"723","task_name":"Design","closed":"0","project_id":"124","project_name":"Website","customer_id":"63","customer_name":"Luno Ltd.","reported_time":"224:00","timer_time":"0:00","total_time":"224:00,"day_marker":"working","comment":true,"yesterday":null,"week":"120","month":"224","total":"382"},"errors":[]}
mark_day
Marks current day as 'vacation', 'sick', 'public-holiday' or 'other' or clears existing marker if value not specified.
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password | |
class | no | day marker ('vacation', 'sick', 'public-holiday', 'other') or empty |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret&class=sick" https://mrticktock.com/app/api/mark_day
Example response:
{"content":"Day successfully marked as sick","errors":[]}
get_notes
Retrieves public and private notes for the given tasks (date is TODAY). Only notes created by current user are returned.
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password | |
task_id | yes | id of task |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret&task_id=162" https://mrticktock.com/app/api/get_notes
Example response:
{"content":{"public":"example public note","private":"example private note"},"errors":[]}
update_notes
Updates public and private notes for the given tasks (date is TODAY).
If note is not specified then it is removed on the server side (remember to set note to the previous value if you don't want to delete it).
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password | |
task_id | yes | id of task | |
public | no | public note text | |
private | no | private note text |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret&task_id=1626&public=test" https://mrticktock.com/app/api/update_notes
Example response:
{"content":"Note updated successfully","errors":[]}
close_tasks
Closes selected tasks.
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password | |
tasks | yes | ids of task to close (separated with semicolon) |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret&tasks=11311;12141" https://mrticktock.com/app/api/close_tasks
Example response:
{"content":"Tasks closed successfully","errors":[]}
open_tasks
Opens selected tasks.
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password | |
tasks | yes | ids of task to open (separated with semicolon) |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret&tasks=11311;12141" https://mrticktock.com/app/api/open_tasks
Example response:
{"content":"Tasks opened successfully","errors":[]}
show_tasks
Marks selected tasks visible.
Visible tasks are displayed on the web application Tick-Tock page but this information can be used also by remote client application like we do in Android app.
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password | |
tasks | yes | ids of task to show (separated with semicolon) |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret&tasks=11311;12141" https://mrticktock.com/app/api/show_tasks
Example response:
{"content":"Tasks made visible successfully","errors":[]}
hide_tasks
Marks selected tasks not visible (hidden).
Hidden tasks are not displayed on the web application Tick-Tock page. This information can be used by remote client application.
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password | |
tasks | yes | ids of task to hide (separated with semicolon) |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret&tasks=11311;12141" https://mrticktock.com/app/api/hide_tasks
Example response:
{"content":"Tasks hid successfully","errors":[]}
who_is_off
Retrieves list of absent people for today and tomorrow together with absence type (off, sick, non-working).
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret" https://mrticktock.com/app/api/who_is_off
Example response:
{"content":[{"id":"24","email":"john.doe@gmail.comm","first_name":"John","last_name":"Doe","today_marker":"off","tomorrow_marker":"non-working"}],"errors":[]}
who_is_off_v2
Retrieves list of absent people for today and tomorrow together with absence type (vacation, sick, other, public-holiday).
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret" https://mrticktock.com/app/api/who_is_off_v2
Example response:
{"content":[{"id":"24","email":"john.doe@gmail.comm","first_name":"John","last_name":"Doe","today_marker":"vacation","tomorrow_marker":"public-holiday"}],"errors":[]}
get_user_info
Returns user details.
Parameters:
Name | Required | Description | Default |
---|---|---|---|
yes | user email | ||
password | yes | user password |
Example usage:
curl -d "email=john.smith@gmail.com&password=secret" https://mrticktock.com/app/api/get_user_info
Example response:
{"content":{"first_name":"John","last_name":"Smith"},"errors":[]}