Description: Export a report and its' data to a PDF, JSON, or CSV file.
Since: 3.8
Security: Requires a user with the Manage Reports role.
Notes: For Xray version 3.21.2 and above with Projects, a Project Admin with Manage Security Assets privilege can export a report using this REST API in the scope of a project, by using the additional query parameter projectKey
.
Usage: GET /api/v1/reports/export/{id:.*}
Note that report ID can be retrieved using the GetReportsList REST API.
Usage Note: There are two mandatory query parameters that need to be provided:
File_name: The desired file name for download (without a suffix)
Format: pdf| json | csv
Sample Request
GET api/v1/reports/export/{15}?file_name=vuln_report_1&format=pdf
Export Report in Projects
GET api/v1/reports/export/15?file_name=vuln_report_1&format=pdf&projectKey=<project_key>
Response:
A ZIP
file stream contains the file with the following name convention: <file_name>.pdf|json|csv
.
The response stream does not display a filename, but only contents inside it.