Exporting analytics and API event data to CSV files

You can export the aggregated analytics data from individual visualizations to a comma-separated values (CSV) file. [V5.0.4 or later] You can also export API event data that is associated with an entire dashboard to a CSV file.

Exporting analytics data from a visualization

From a visualization, you can view the raw aggregated data from which the graphical representation is constructed, and then export that data to a CSV file.

Procedure

To export analytics data from a visualization, complete the following steps:

  1. [V5.0.7 or later]From a dashboard, view the raw data behind the visualization by hovering over the visualization container and then clicking the caret icon The Caret icon that is displayed in the lower left corner.

    [V5.0.6 and earlier]From a dashboard, click the caret icon The Caret icon on the visualization container to display the raw data behind the visualization.

    In the resulting grid, a row is displayed for each aggregated data set that matches the search criteria configured in the visualization's aggregation builder. The raw data shown in the columns and rows depends on the type of visualization accessed and the aggregations configured for that visualization.
    [V5.0.7 or later]Sample raw data for a visualization
    [V5.0.6 and earlier]Sample raw data for a visualization
    Tip: If you scroll vertically or resize the container to eliminate the vertical scroll bar, you can see the Raw and Formatted links that can be used to export data, and also see the Page Size drop-down list, which determines how many rows are visible at a time. Notice also that if you continue to increase the height of the container, you will be able to see both the graphical representation and raw data at the same time, as shown in the following image. ([V5.0.7 or later]You can hide the graph again by decreasing the container height. [V5.0.6 and earlier]You can hide the graph again by decreasing the container height or clicking the arrow icon Arrow icon.)
    [V5.0.7 or later]Sample raw data for a visualization
    [V5.0.6 and earlier]Sample raw data for a visualization
  2. Export a tabular format of the raw data that is displayed in the grid:
    • To export the data as stored in Elasticsearch, click the Raw link.
    • To export Kibana formatted data that is similar to what you see in the grid, click the Formatted link.
  3. [V5.0.7 or later]Choose to save the file, which is named visualization_name.csv by default.
    [V5.0.6 and earlier]Choose to save the file, which is named table.csv by default.

    The file is saved to the download location that is configured for your browser. If you intend to export more than once from the same or another visualization, and you are exporting to the same location each time, you might want to rename each file with a meaningful name to help you differentiate between them.

  4. [V5.0.7 or later]To close the raw data view of the visualization, hover over its container and then click the toggle icon Toggle icon in the lower left corner.

    [V5.0.6 and earlier]To close the raw data view of the visualization, click the toggle icon Toggle icon on the visualization container.

[V5.0.4 or later] Exporting API event data from a dashboard

You can export the API event data that is collectively generated for the aggregated data sets in all visualizations, and across the defined time frame, in a dashboard. When you export the event data, a CSV file is created. The CSV file contains one API event record for each API invocation in the Gateway server.

Procedure

To export API event data from all visualizations in a dashboard, complete the following steps:

  1. Open the dashboard from which you want to export data, as described in Opening saved dashboards.
  2. If required, apply filters to change the sampling of data displayed in the visualizations. For example, specify a different time period, or apply inclusion or exclusion filters.
    For more information, see Applying filters to change the sampling of data displayed in visualizations.
    Note: Only API event records for the currently filtered data set are exported to the CSV file.
  3. [V5.0.7 or later]From the dashboard, click the Export icon The Export icon.
    [V5.0.4, V5.0.5, and V5.0.6]From the dashboard, click the Export icon The Export icon.

    [V5.0.7 or later]The Export Analytics Events panel opens to display a message, which informs you that a CSV file of the exported event data will be generated in the background.[V5.0.4, V5.0.5, and V5.0.6]You see a message on the screen, which informs you that a downloadable CSV file of the collected data will be generated in the background.

  4. [V5.0.7 or later]Click the Export button to start the export. You can view the status bar to monitor the progress as the file downloads to the server. You can select Download
    [V5.0.4, V5.0.5, and V5.0.6]Click the Export button to close the message and start the export.
    Important:
    • [V5.0.7 or later]While the file is being generated, you can continue to work within the analytics dashboards under the Analytics tab. If you switch from Analytics to another tab (such as Products or Settings), or to another component in the API Manager user interface, it cancels the download step of your Export operation. If you leave the tab, the initial export process to the server continues in the background. If it is within the time that the Exported files are retained (usually 1 hour by default) and no other Exports are started, you can return to the Analytics tab and select Download to download the file from the last Export.
    • [V5.0.4, V5.0.5, and V5.0.6]While the file is being generated, you can continue to work within the analytics dashboards under the Analytics tab. Do not, however, switch from Analytics to another tab (such as Products or Settings), or to another component in the API Manager user interface because this will cancel the export operation.
    • If your browser is configured to block pop-ups, the download of the CSV file might be blocked. The precise behavior varies across browsers, but if you see a notification about blocked pop-ups, reconfigure the browser to always allow pop-ups for the API Manager host address. Then attempt the export again.
  5. If prompted, choose to save the file, which is named analytics_export.csv by default.
    The file might also be automatically downloaded depending on your browser.
    The file is saved to the download location that is configured for your browser. If you intend to export more than once, and you are exporting to the same location each time, you might want to rename each file with a meaningful name to help you differentiate between them.

    The CSV file contains a row for each API event record. You can import this CSV file into other software tools to further analyze your API Connect usage. For information about the fields that are included in the CSV file, see API event records.

    Note: The content of the API event records in the CSV file depends on the logging policy that is set for the operation. If the logging policy includes the HTTP headers and the payload, then these details are included in the API event record. Where the payload is large, it might take longer to complete the export of the analytics data. For more information, see activity-log policy.
  6. [V5.0.7 or later] Click the Export icon The Export icon to close the Export Analytics Events message panel.