Download an exported file

After making a request to the /v2/workbooks/{workbookId}/export endpoint, you can use this endpoint to download the exported file using the queryId returned in the response. See Export data from a workbook.

Usage notes

  • The export must be ready to download before you can download the results. The endpoint returns an error if the query is still processing or if the queryId is invalid or expired. Query results are typically available for a limited time, so make sure to download query results while they are available.
  • Retrieve the queryId by making a request to the /v2/workbooks/{workbookId}/export endpoint.
  • Specify the file format when you make the export request. You cannot specify the file format when you download the file.

Usage scenarios

  • Scheduled reporting: Automate the downloading of reports generated on a scheduled basis.
  • Data analysis: Retrieve large datasets for local analysis in external tools not integrated directly with Sigma.

Best practices

  • Monitor the status of the export query before attempting a download to make sure it is ready. For a code example, see Export to CSV with Date Range Parameters.
  • Handle errors gracefully in your application, providing users with clear messages regarding the status of their requested downloads.
Recipes
📖
Workbook: Export to CSV with Date Range Parameters (JavaScript)
Open Recipe
📖
Workbook: Export to PDF (JavaScript)
Open Recipe
Language
Credentials
OAuth2
URL
Click Try It! to start a request and see the response here!