1

I'm trying to extract a custom report from activecollab via API as a CSV file to be imported into a visualization tool.

I've requested the activecollab API key with:

curl -k --data "api_subscription[email]=****@*****.com&api_subscription[password]=********&api_subscription[client_name]=****&api_subscription[client_vendor]=****" https://*************/api.php

This works successfully and returns the API key in plain text.

How do I request the report after that? Report URL:

https://*****************/public/index.php?path_info=timereportsplus%2Frun&export_format=csv&async=1&filter%5Bshow_time_records%5D=1&filter%5Btype_filter.....[lots of filters]

I get this URL by copying the link address of the 'Export CSV' link at the bottom of the report.

I can successfully get the report if I feed the cookies from the first interaction with the login page to the report generation URL(above). But I want to avoid using cookies.

Is there a way to authenticate with the API key and return the report in a single call?

Other details: activecollab version: 5.0.100

Vojtech Ruzicka
  • 16,384
  • 15
  • 63
  • 66
mic
  • 11
  • 1

1 Answers1

0

What you have there is not Active Collab 5. Version 5 does not support third party modules (and that request is clearly targeting Reports Plus plugin). You are probably using version 4 or older.

In versions older than Active Collab 5, not all resources that are available to the web interface are available via API. Particular resource that you are trying to fetch is clearly intended for web interface only because it response well to web interface requests (where you auth with a cookie), but rejects API requests.

All API resources that Active Collab 4 supports are listed here:

https://activecollab.com/help-classic/books/api/

Please consult third party module vendor and see if they can make that resources available to API.

Ilija
  • 4,105
  • 4
  • 32
  • 46