Skip to main content
Question

Using the ExecutionID in the 'Get exported report file stream' API call

  • October 14, 2021
  • 1 reply
  • 264 views

I am extracting the ExecutionID from the following ‘export report as csv’ API endpoint:

GET /analytics/v1/reports/{report ID}/export/csv 

 

The ExecutionID is required to make the following ‘download filestream‘ API Call:

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

 

When I make the ‘download filestream’ call , I get the following error:

{"success":false,"error":"Extraction download not ready","errorCode":1005} 

 

This is happening because when I make the first call, it processes the CSV file hence is busy when I make second API call.

 

Anyone know of a work around for this?  Is there a way to turn the export csv off via  parameter?

1 reply

  • Newcomer
  • 1 reply
  • January 24, 2023

I am extracting the ExecutionID from the following ‘export report as csv’ API endpoint:

GET /analytics/v1/reports/{report ID}/export/csv 

 

The ExecutionID is required to make the following ‘download filestream‘ API Call:

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

 

When I make the ‘download filestream’ call , I get the following error:

{"success":false,"error":"Extraction download not ready","errorCode":1005} 

 

This is happening because when I make the first call, it processes the CSV file hence is busy when I make second API call.

 

Anyone know of a work around for this?  Is there a way to turn the export csv off via  parameter?

 

What you should do is make a loop that calls GET analytics/v1/reports/{{reportId}}/exports/{{executionId}} and wait for it to say the job has SUCCEEDED (it will be in the body of the response). Once that happens, the you can move on to the download.