Skip to main content

When I run the /report/v1/report API, it returns a list of reports (the old reports). How do I pull a list of the new reports?

My end goal is to find a report ID so I can run the API to pull the report.

Thanks!

Sadly, I don’t think so. Would love to be wrong here. Reports in general are a big miss right now via API.


We have a new endpoint that access the new reports section. The methodology there is slightly different.

Using the following API endpoint, an integrator can call upon Docebos APIs to provide a list of available reports, then selecting the ID of the relevant reports, call for those reports to be run. Once they are complete, the integrator can then call for the data of the reports in a paginated fashion, up to 1000 rows at a time.

 

Here is the endpoint:

 

analytics/v1/reports

 

The proposed workflow would look like this:

 

1 - Get the ID of the report you want the Records for

GET analytics/v1/reports

 

2 - Start the execution process, which requires the report id returned in the previous request

GET /analytics/v1/reports/{report_id}/export/csv

 

3 - Check the status of the execution process, requires both report id (step 1) and id export (returned in step 2). Call this API until status = successful

GET /analytics/v1/reports/{id_report}/exports/{id_export}

 

Either A) Get the report from the URL that is returned in step 3, or use step 4 to get the report in a paginated fashion, 1000 rows at a time.

 

4 - Get the lines of the report, up to 1000 lines at a time. Requires id export and report id supplied above

GET /analytics/v1/reports/{report_id}/exports/{export_id}/results

 

This endpoint can produce 1000 rows per response, paginated. 

 


This is great news! @kerry.roberts does this work for only new reports, only old reports or both?


The report and new reports seem to be two different processes with the API. However, there might be something to be done using the migration of new reports, although we have not yet tested this.

  • Report
    • report/v1/report/[report_ID]/data
  • New Report
    • Just like described above

I’m still trying to trigger the “nextToken” for the new reports, but we are close to having a full API process. 😊


Got it! When you pass the next token as a parameter, you need to be careful of two things:

  • The token needs to be encoded in ASCII using the percent sign (“%”). For example, “==”  would be “%3D%3D”
  • The “pageSize” parameter should not be used at the same time, otherwise the call will not recognize the next token parameter.

To use the example from above, the next token would be written as such:

  • GET /analytics/v1/reports/{report_id}/exports/{export_id}/results?nextToken=snextToken]

I hope this helps. 🙂


Hi All, my Get Analytics call return empty string for [nextToken] since 26 Jul 2024. Is anyone have idea why?  The call before 26 Jul works fine and checked the report output have more than 1 page of data (download csv report contain all the records but only api get analytic call do not return the nextToken).

Thanks for helping.

API return:

"nextToken": ""


Reply