Menu

Export Data from Flex Insights via API

Learn how to export reports from within Insights to store the data in a warehouse of your own with this guide.

The export process consists of the following steps:

Prerequisites

Before you start exporting data you will need to have:

  • a provisioned Flex Insights Workspace
  • the credentials of a user with access to the Insights Workspace
  • a table report that contains data you need to export
  • REST API client support for cookies that are used to pass authentication tokens

API Authentication

Ensure that you are authenticated against the Flex Insights API by having a valid TT (temporary token).

The procedure is detailed at API Authentication

Export the raw report

Exporting the raw report is useful for getting machine-friendly data from any report created from your Flex Insights Analytics Portal. You will need the ID of the workspace and ID of the report object to export the data.

Workspace ID: Log in to the Analytics Portal and check the URL in the browser address bar. For example:

Workspace id

The workspace ID is the string appearing between the #s=/gdc/projects/ segment and the vertical bar. In this case, the workspace ID isz2nxqtb1r6weuly0iivexz6hu5dathua.

Object ID: Within Analytics Portal navigate to the report you'd like to export, and check the URL in the address bar. It may look like this:

Report ID

Object ID is the numerical expression at the very end of the URL and is typically preceded by obj/ segment. In the example above, Object ID is 3295.

The maximum report size for raw exports is 10GB. Exporting a report of this size may take minutes.

Download the report

Download the report by using URI from previous export.

If you receive 202 response from API, it means that the request is accepted, but not ready to be delivered (still computing or preparing the CSV).
Since the export API can take several seconds, or minutes in edge cases, depending on the volume of data and number of columns, you need to add a retry in case the server returns 202. The data is only ready to download when the server returns 200.

        
        
        
        

        Log out

        After you performed all necessary operations, you should log out to invalidate the SST. For this you need to know your profile ID which can be found in response of API Authentication.

              
              
              
              
              Rate this page:

              Thanks for rating this page!

              We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

              Need some help?

              We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.