Modification timestamp of time registration in Active Collab API response

24 Views Asked by At

we use the API of Active Collab to import all the time registrations in our own application.

At the moment this is done by calling the following URL: https://app.activecollab.com/ACCOUNT_ID/api/v1/reports/run?type=TrackingFilter&project_filter=active&tracked_on_filter=selected_range_2023-11-25:2024-01-04

Is there a way to also get the last modification timestamp (of each time registration)? Or order/filter it on that field?

This would make processing those records a lot easier.

Thanks in advance for your help!

Best regards Loïc

1

There are 1 best solutions below

1
Ilija On

API that you are using is built primarily for reporting, to fetch large chunks of data and display them within a report. It is not built to return all properties of time records, so time of record's last update is no there, nor report can be sorted by that value.

To fetch that data, it's probably better to loop through all projects, and then keep fetching /api/v1/projects/:id/time-records?page=:page responses (by incrementing page with each iteration) until you get an empty result (reach the end of the list). You'll find timestamp of record's last update under updated_on field within these responses.