0

The clockify API is unclear (to me) about how to iterate through results.

For example, https://clockify.github.io/clockify_api_docs/#operation--workspaces--workspaceId--timeEntries--get says

Each request is limited to 10 time entries. To get the other 10 (and the next 10 and so on), you'll have to include the page parameter and increment it with each request (eg. https://api.clockify.me/api/workspaces/{workspaceId}/timeEntries/?page=1)

Data returned from this endpoint is merely an array of timeEntries (bonus for being simple!). Reading beyond the last page returns an empty array (status=200).

So, the question is: Does clockify intend that clients read until an empty array, or am I missing something?

Reece
  • 7,616
  • 4
  • 30
  • 46

1 Answers1

0

This is the existing behaviour I am afraid.

Hopefully, there will be "CurrentPage", "PageLength", "TotalPages" or at least "TotalRecords" in the RESPONSE body someday.

EDIT: According to the support response their developers are working on adding TotalRecords node to let us know how many items we can expect.

mike35x95x1
  • 163
  • 1
  • 8