Search code examples
apiactivecollab

Active Collab. Can't get time-records via REST API


I'm trying to get task info via Active Collab REST API and have a problem. I got token by login and password and successfully made a request on next URL's:

GET on https://app.activecollab.com/ACCOUNT_ID/api/v1/projects
GET on https://app.activecollab.com/ACCOUNT_ID/api/v1/projects/1

But I receive 404 on:

GET on https://app.activecollab.com/ACCOUNT_ID/api/v1/projects/1/time-records

I found this endpoint in the documentation

https://developers.activecollab.com/api-documentation/v1/projects/elements/time-records/time-records.html

Could you please explain to me what am I doing wrong?

Thank you very much


Solution

  • Time tracking is not enabled by default per project. You can make sure that you enable it when you create a project (or update project's settings), or check whether it is enabled in your code.

    To check if it is enabled, you can probe for 404 on /projects/:project_id/time-records API end point, or you can check for is_tracking_enabled property in response that you get from /projects/:project_id API response.