Download export by run ID

Download an export

Details

Download an export. See Analytics Reports API quickstart for more details.

Find the version of this endpoint to run for a specific export job in the downloadUrl field returned from /reports/report/workflowId/runId/status. If the downloadUrl field is empty, the export is not ready. Export generation times may vary. Wait for a while and try the statusUrl again.

The downloadUrl will look something like this;
https://analytics-api.app.lithium.com/api/public/reports/report/ b8520152-0f68-338e-8c49-db6190be58f9/233mkcTFbmE%2B40bqQ3db%2F4SnnqomXScvqbK%2FkdzMtD0qo%3D/ download?companyKey=[COMPANY KEY]

🚧

Important

Notice the -L in the cURL example.

Export files are stored in a secure, non-public location. When you call /reports/report/workflowId/runId/download, Care Analytics creates a pre-signed URL to use to download the export file and return an HTTP 307 Temporary Redirect, with the location for the redirect being that signed URL.

Because calling the downloadUrl returns a 307 response, you must follow redirects. The -L in the cURL example follows the redirect and downloads the file. However, because the downloadUrl is a pre-signed URL, you must not pass along the basic auth parameters when following the redirect.

The pre-Signed URL is only valid for a short period of time, so it should not be saved or reused. Instead, call the /reports/report/workflowId/runId/download endpoint again.

Language