Maulik kanani
Maulik kanani

Reputation: 51

I can't get "Find personal time entry in progress" using clockify API

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?

Upvotes: 1

Views: 341

Answers (2)

Maulik kanani
Maulik kanani

Reputation: 51

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.

Upvotes: 1

Stephen Read
Stephen Read

Reputation: 26

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.

Upvotes: 0

Related Questions