1

I will try to get those users whose time tracking start currently in clockify

and I'm trying to use the following API endpoint to get the user:

i have attached postman collection endpoint

How to get user list using this endpoint?

Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56

2 Answers2

1

I have made custom logic for check user is currently working or not I have made a loop that checks the user is in progress or not. e.g

public getClockifyBaseWorkerStatus(clokifyApiKey: string) {
    let headers = new HttpHeaders().set('X-Api-Key', clokifyApiKey ? clokifyApiKey : environment.clokifyApiKey);
    return this.http.get<any>(`https://api.clockify.me/api/workspaces/${environment.clockifyWorkSpace}/timeEntries/inProgress`, { headers })
      .pipe(map((data) => { return data; }));
  }

so, in this function, I have pass different clokifyApiKey and check the status of the user is currently working or not.

I hope this answer will help other people in the future.

0

The GET /workspaces/{workspaceId}/timeEntries/inProgress only returns your own currently running timer, not the entire workspaces, per the API docs (https://clockify.github.io/clockify_api_docs/#tag-Time-entry). So you can't get a list of active timers in the workspace other than for yourself. From what I can tell it is not possible to get a list of users with active timers.

  • 1
    True. But, the ability to get all the timers from your workspace is in development. It'll be available in the future. Currently the only workaround is to ask each user for their API key and get each one's timer. – Aleksandar Olic Feb 28 '19 at 06:30