PDF Report Generation

Endpoints related to report generation

Generates PDF Reports

POST https://api.vscanner.ai/v1/api/reports/generate

Request Body

NameTypeDescription

report_type*

String

What type of report to generate. Accepted values can be found on the table below.

scan_id*

String

Scan ID of the desired scan to generate the report

target_url*

String

The URL of the target to be displayed in the report

language

String

The desired language of the report, the supported ones are: "pt" (Brazilian Portuguese) and "en" (English)

color_theme_hex

String

The hex value for the desired theme color

logo

String

A link to the public URL of your logo

VScanner API allows you to generate Whitelabel PDF reports with your custom theme color and logo.

Currently VScanner supports the following report types values:

report_type

COMMERCIAL_RISK_REPORT

SUMMARIZED_REPORT (Coming soon)

The response will be a PDF file.

Example Python Code:

import requests
import json

url = "https://api.vscanner.ai/v1/api/reports/generate"

API_KEY = <YOUR_API_KEY>

payload = json.dumps({
  "report_type": "COMMERCIAL_RISK_REPORT",
  "target_url": "http://testphp.vulnweb.com",
  "logo": "https://fablabs.azurewebsites.net/wp-content/uploads/2019/05/logo-placeholder.jpeg",
  "color_theme_hex": "#c2992b",
  "scan_id": "3f3f1a4c-1467-11ee-a5d1-a666a2eb431f"
})
headers = {
  'Authorization': f'Bearer {API_KEY}',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.content) 

Example cURL:

curl --request POST \
  --url https://api.vscanner.ai/v1/api/reports/generate \
  --header 'Authorization: Bearer <API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{"report_type": "COMMERCIAL_RISK_REPORT", "scan_id": "<ENQUEUED_SCAN_ID>", "logo": "<PUBLIC_LOGO_LINK>", "color_theme_hex": "#e3175e", "language": "en"}'

Last updated