Export reports

2 minute readDeveloper productivityData analytics

Exporting your CloudBees Analytics reports can be extremely useful to perform complex analysis, import data to visualization tools, or prepare highly customized reports. CloudBees CD/RO provides several methods to export CloudBees Analytics reports.

Export reports limitations

The following limitations exist for exporting CloudBees Analytics reports:

  • Due to OpenSearch syntax restrictions, the characters [, ], and > are restricted and cannot be used as part of Aggregations  Label entries.

  • Report Aggregations  Label entries may only contain letters, digits, hyphens, underscores, and periods to export the report to XML. If Label entries contain spaces, XML entities, or other special characters (for example, test &!), you must export the report to JSON.

    • When exporting reports via API methods, if your reports contain Aggregations  Label entries with spaces, XML entities, or other special characters (for example, test &!), you must export the report in JSON using the --format option.

      Export report in JSON API example
      ectool --format json runReport <projectName> <reportName>

      If you attempt to export such reports in XML, you will receive an IllegalArgumentException error.

    • When exporting reports from the CloudBees CD/RO UI, if your reports contain Aggregations  Label entries with spaces, XML entities, or other special characters (for example, test &!), you must export the report in JSON.

      If you attempt to export it as an XML, an XML file is exported with an error message. such as:

      Illegal character XML export example
      <error requestId="790"> <code>InternalError</code> <message><![CDATA[java.lang.IllegalArgumentException: Illegal character in name: 'test 1&!'.]]></message> <details><![CDATA[java.lang.IllegalArgumentException: Illegal character in name: 'test 1&!'. ....
  • When exporting queries from OpenSearch, there is a 10,000 result limit. This means only the first 10,000 results returned by your query in CloudBees Analytics can be exported.

Export reports using APIs

You can use the runReport API command to export your CloudBees Analytics reports for direct use in procedures and pipelines. For more information, refer to Perl runReport and Groovy runReport.

If your report uses any Aggregations  Label entry that contains spaces, XML entities, or other special characters (for example, test &!), you must export it as JSON. For more information, refer to Export reports limitations.

Export reports from UI

In CloudBees CD/RO v2024.09.0 and later, you can export reports directly from the CloudBees CD/RO UI in either XML or JSON format.

To export a report:

  1. From the CloudBees CD/RO left navigation, select Analytics  Reports.

  2. Select the report you want to export. The report opens in the Report editor page.

  3. Select the Tabular preview option at the top of the page.

  4. Select the options menu on the right side of the page.

  5. Select the Export Report option. The Export window opens.

  6. For Report format, select to export the report in either XML or JSON.

    If your report uses any Aggregations  Label entry that contains spaces, XML entities, or other special characters (for example,test &!), you must export it as JSON. For more information, refer to Export reports limitations.

  7. For Report form, select to export either the Full data or Preview data.

    • Preview data: Only the first 20 results are exported.

    • Full data: The first 10,000 results are exported. For more information, refer to Export reports limitations.

  8. Select Export.

After you select Export, a download starts with the report in the selected format.