Export a report to PDF

Allows exporting a report in PDF format, providing options for detailed or summary modes. A URL is returned in a successful response.

Resource name: /api/v1/seikan/report/{id}/export/pdf

Request Method: POST

Request parameters

Title Parameter Type Data Type Description

id

mandatory

Path string Report ID. To get the report ID value, use GET /report/findAllReports method from the Reports Resource Group.
expandedMode
mandatory
Query boolean

Defines how detailed the exported report is. Useful when a report of a group of devices is generated.

  • true: Detailed mode. Displays all devices.

  • false: Summary mode. Displays a shortened list of devices in some dashboard categories.

isForPrint
mandatory
Query boolean

Defines whether the report is printed or not after being exported.

  • true: The report is printed. When navigating to the URL provided in the response, the print URLs page is displayed in the browser from which you can print the selected pages of the report.

  • false (default): The report is not printed. When navigating to the URL provided in the response, the report will be downloaded automatically.

pageName

mandatory

Body string

The report page name. See the list of report page names below.

Note: Not all devices contain all these pages. To confirm which pages a device's report contains, open a sample report in the AFA Interface

Note: Each report page must be requested individually.

Request example

[
    {
      "pageName": "risks"
    },
    {
      "pageName": "optimize-policy"
    },
    {
      "pageName": "optimize-policy.duplicate-objects"
    },
    {
      "pageName": "regulatory-compliance.nist_800-53"
    }
  ]

cUrl Example

curl -X POST "https://<localhost>/api/v1/seikan/report/{id}/export/pdf?expandedMode=true&isForPrint=false" \
     -H "Content-Type: application/json" \
     -d '{"pagesToExportRequest":[{"pageName":"risks"},{"pageName": "optimize-policy"},{"pageName": "optimize-policy.duplicate-objects"},{"pageName": "regulatory-compliance.nist_800-53"}]}'

Status codes

Code Description
200 OK
400 Bad Request
401 Unauthorized
403 The session does not have permissions
404 Not Found
423 Locked
429 Too Many Requests
500 Internal Server Error
503 Service Unavailable

Response example success 200

A URL is returned. Copy it to your browser adding the machine to the beginning of the string. For the example below, the full URL will be: https://<localhost>/afa/session-j19t2g4q1fjum0tti66gm5e9b9/work/export-4830766065349284314/afa-6495-multiple-pdf.zip.

"/afa/session-j19t2g4q1fjum0tti66gm5e9b9/work/export-4830766065349284314/afa-6495-multiple-pdf.zip"

Response example failure 400

"Invalid request parameters."