PDF Report Generation

Endpoints related to report generation

Generates PDF Reports

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

Generate a report file of the type choosen, it returns a pdf file

post
Authorizations
Body
report_typestring · enumRequiredPossible values:
target_urlany ofOptional
stringOptional
or
nullOptional
scan_idstringRequired
logostringOptionalDefault: https://assets-global.website-files.com/64ed0ac2af76cef9257aaa3c/64ee56105f0be4397f8faed3_logo%20vscanner%20(1).png
languageall ofOptionalDefault: pt
string · enumOptionalPossible values:
color_theme_hexstringOptionalDefault: #797cf2
Responses
200
Successful Response
application/json
Responseany
post
POST /v1/api/reports/generate HTTP/1.1
Host: 
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 246

{
  "report_type": "COMMERCIAL_RISK_REPORT",
  "target_url": "text",
  "scan_id": "text",
  "logo": "https://assets-global.website-files.com/64ed0ac2af76cef9257aaa3c/64ee56105f0be4397f8faed3_logo%20vscanner%20(1).png",
  "language": "pt",
  "color_theme_hex": "#797cf2"
}

No content

Request Body

Name
Type
Description

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. You can choose two types of reports to generate

  1. Whitelabel Report: A professionally branded PDF report with customizable theme colors and your organization's logo. This report is designed for easy readability, highlighting critical vulnerabilities and valuable insights at a glance, making it ideal for presentations or sharing with stakeholders.

  2. Action Report: An AI-generated PDF that provides a detailed, step-by-step plan to address detected vulnerabilities. It prioritizes actionable insights, offering practical recommendations to help you efficiently resolve security issues and strengthen your defenses.

Currently VScanner supports the following report types values:

report_type

COMMERCIAL_RISK_REPORT

ACTION_REPORT

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