WORKSECTION

Timers

Getting the list of active timers through API: get_timers

Sample get_timers request

?action=get_timers
Returns running timers info
*their ID, start time, timer value and who started them

Returned data:
  • id — timer ID
  • time — timer value (at the moment of sending the request)
  • date_started — timer start date and time
  • user_from — info on who started the timer
  • task — dataset on a project and task, where the timer is running (see get_task method for details on returned parameters meaning)

Sample JSON response
If the request succeeds, the response will contain ok status and the following data:

{
    "status": "ok",
    "data": [
        {
            "id": "TIMER_ID",
            "time": "HH:II:SS",
            "date_started": "YYYY—MM—DD HH:II",
            "user_from": { "id": "USER_ID",
                "email": "USER_EMAIL",
                "name": "USER_NAME"
            },
            "task": {
                "id": "TASK_ID",
                "name": "TASK_NAME",
                "page": "/project/PROJECT_ID/TASK_ID/",
                "status": "active",
                "priority": "1",
                "user_from": {
                    "email": "USER_EMAIL",
                    "name": "USER_NAME"
                },
                "user_to": {
                    "email": "USER_EMAIL",
                    "name": "USER_NAME"
                },
                "project": {
                    "id": "PROJECT_ID",
                    "name": "PROJECT_NAME",
                    "page": "/project/PROJECT_ID/"
                }, "text": "TASK_TEXT",
                "date_added": "YYYY—MM—DD HH:II", "date_start": "YYYY—MM—DD",
                "date_end": "YYYY—MM—DD", "time_end": "HH:II",
                "max_time": 20,
                "max_money": 500, "tags": { "TAG_ID": "TAG_NAME_1", "TAG_ID": "TAG_NAME_2" }
            }
        }, { "id": "TIMER_ID", "time": "HH:II:SS", ... ... ...
}
    ]
}

Was this article helpful? Yes, thank you! No

Stopping the timer through API: stop_timer

Sample stop_timer request

?action=stop_timer&timer=TIMER_ID
Stops and saves selected running timer

Required parameters:
  • timer — timer ID (can be obtained through get_timers method)

Sample JSON response
If the request succeeds, the response will contain ok status

{
    "status": "ok"
}
Was this article helpful? Yes, thank you! No

Getting the authorized user active timer through API: get_my_timer

Sample get_my_timer request

?action=get_my_timer
Returns authorized user (oauth2) active timer

method available only for access token

Returned data:
  • time — timer value (at the moment of sending the request)
  • date_started — timer start date and time
  • task — dataset on a project and task, where the timer is running (see get_task method for details on returned parameters meaning)

Sample JSON response
If the request succeeds, the response will contain ok status and the following data:

{
"status": "ok", "data": [ { "time": TIMER_VALUE, "date_started": "YYYY—MM—DD HH:II", "task": { "id": "TASK_ID", "name": "TASK_NAME", "page": "/project/PROJECT_ID/TASK_ID/", "status": "active", "priority": "1", "user_from": { "id": "USER_ID", "email": "USER_EMAIL", "name": "USER_NAME" }, "user_to": { "id": "USER_ID", "email": "USER_EMAIL", "name": "USER_NAME" }, "project": { "id": "PROJECT_ID", "name": "PROJECT_NAME", "page": "/project/PROJECT_ID/" }, "date_added": "YYYY—MM—DD HH:II" } } ] }
Was this article helpful? Yes, thank you! No

Starting the authorized user timer through API: start_my_timer

Sample start_my_timer request

?action=start_my_timer&id_task=TASK_ID
Starts authorized user (oauth2) timer in selected task

method available only for access token

Required parameters:
  • id_task — task ID

Sample JSON response
If the request succeeds, the response will contain ok status:

{
"status": "ok" }
Was this article helpful? Yes, thank you! No

Stopping the authorized user active timer through API: stop_my_timer

Sample stop_my_timer request

?action=stop_my_timer
Stops and saves authorized user (oauth2) active timer

method available only for access token

Optional parameters:
  • comment — timer log comment

Sample JSON response
If the request succeeds, the response will contain ok status:

{
"status": "ok" }
Was this article helpful? Yes, thank you! No
Russian invasion to Ukraine Worksection has terminated its operations in Russia Why?
esc
или
Print