Search code examples
clockify

What the best clockify API endpoint to get time entries of (grouped by) saved reports?


Asking here, after asking to Clockify support.

Trying to extend some of clockify capabilities to create extra reporting for our clients, I’ve been playing with your API and specifically: the enpoint /reports/{reportsId}

My goal:

Get all the time entries of a specific "saved report” (usually saved by our Project Managers)

What I EXPECT from "/reports/{reportsId}”:

To get all the info and entities (users, time entries, projects, etc.) only regarding that particular reportId

What I GET from "/reports/{reportsId}”:

Lots of info regarding the whole workspace, and I only see summaryReport as more “specific to the saved report itself”...

Questions:

  1. Is this the correct behavior?
  2. How do you filter down time entries of specific reports in URLs like https://clockify.me/bookmarks/BOOKMARK_HASH_HERE ?

    • Do you only call "/reports/{reportsId}” and filter down on client-side? (it seems to me that way, exploring the Network tab)
    • If that’s the way, what’s the point of calling the report endpoint? Only for the summaryReport object? 3- Is "/reports/{reportsId}” the best endpoint I can use to reach my goal? …or which way would you recommend me?

Solution

  • summaryReport.timeEntries will contain all the individual time entries from that particular report. Each entry has a user, project, client, time etc. Grouping by project is done on the client.

    I'm not sure I fully understand your specific problem though. Are you suggesting the entries you get from the report endpoint do not belong to the given report?