status is completed, then download it or read its data.
Paths and fields call an assessment a “scan”:
scan_uid in a report is the uid of the assessment, as returned by List assessments. To start one, see Start an assessment.Availability and cost
Availability: Attack Surface Reports or Targeted Attack Surface Reports, included in every edition. Either feature opens every endpoint on this page. Cost: no metered allowance. Generating, regenerating, listing and downloading reports use none of your Attack Surface Reports or Targeted Attack Surface Reports allowance. Only starting an assessment does. With an API key, each call that returns2xx counts once toward your monthly API Calls allowance, polls included. Any other status is refunded. See Rate limits.
Without either feature, every call on this page returns 403:
"Your license is not active.". If a call that used to work starts returning it, check your license first. See Plans and quotas.
These endpoints take no allowance unit and hold no capacity slot, so they never return the allowance 429 or a capacity 409. A 429 with "message": "Rate limit exceeded" is the rate limit.
Reports produced automatically
When an assessment reachesCompleted, its report is queued with status: "pending" and starts building about 3 minutes later. You don’t need to call anything.
The automatic report uses the report options you sent when you started the assessment:
report_template_uid, report_language, report_baseline_scan_uid, report_privacy_gate and breach_primary_domain_only. See Report options.
- Automatic reports are always PDF. For JSON, generate a report with
"format": "json". - An unknown template stops the automatic report. The template ID is not checked when the assessment starts. If
report_template_uiddoes not match one of your organization’s templates when the report is queued, no report is created. Generate it yourself with a validtemplate_uid, or without one. - A cancelled assessment gets no report. Reports need an assessment in
Completed. - No data, no automatic report. If the assessment lacks the data its report needs, no report is created. Examples: a targeted VIP Executive assessment that found no executives or employee email addresses, or a Breach Risk assessment whose credential exposure check did not complete. Generate the report yourself to get the reason in the error.
scan_uid to the assessment’s uid.
Report types
report_type picks the report. There are three kinds:
- Snapshot reports describe what one assessment found. A full assessment produces
asm_full. A targeted assessment produces one of the other seven. - Activity reports describe what became known during a calendar window you choose, in UTC.
- Change Comparison describes what changed between two assessments of the same domain.
The flags are the module flags you set when you start an assessment. A targeted assessment switches its report’s flags on for you. A report you generate is built from what the assessment collected. When the data it needs is missing, the call returns
400 or 409 with an error that says what is missing.
From a full assessment started with the default flags, you can generate every snapshot report except Social Media and Exposed Assets, because social_media_enabled and code_exposure_enabled are off by default, and all three activity reports. Its Application Security Report has no verified vulnerability findings, because active_vuln_scan is off by default.
Generate a report
POST /api/hackerview/reports/ generates a report from a completed assessment.
The call returns
201 with the new report:
uid. You need it to download the report and read its data.
An identical request returns the report already in progress. If a report with the same assessment, type, format, language, template, baseline, period, scope and breach_primary_domain_only is still pending or generating, the call returns that report with 201 instead of starting a second one. Once it has finished, the same request builds a new report.
Language. In German, French, Italian or Spanish, the narrative, explanations and table headings are translated while the report builds. Host names, IP addresses, URLs, CVE IDs and other identifiers stay as they are. A passage that cannot be translated stays in English.
Activity reports
An activity report covers a window you choose. Send the window in one of two forms, never both:period_month: one calendar month, asYYYY-MM.period_startandperiod_end: both dates, asYYYY-MM-DD. Both days are included.
- The assessment must complete after the window starts. An assessment that completed before the window began is refused with
409andcode: "scan_predates_period". - An assessment that completed inside the window covers part of it. It is refused with
409andcode: "period_partially_covered". Send"allow_partial_period": trueto accept it. The report then states the range it covers. - No baseline. An activity report already compares the window with the time outside it, so
baseline_scan_uidreturns400.
Comparison reports
A Change Comparison (delta_comparison) lists what is new, changed and gone between two assessments of the same domain, and what could not be compared. It needs two more fields:
comparison_scope: what to compare. One ofbreach_risk,domain_spoofing_riskorexposed_assets_risk. Any other value returns400with the supported values.baseline_scan_uid: the earlier assessment, or"auto"to pick the most recent eligible one.
Completed, and the baseline must have completed first. Both must also have run the modules the scope needs:
"auto"with no eligible assessment returns409withcode: "no_comparable_baseline".- A period is optional.
period_month, orperiod_startandperiod_end, only titles the report and makes"auto"pick a baseline that completed on or before the period start. It does not filter what is compared.allow_partial_periodreturns400.
Follow a report
GET /api/hackerview/reports/ lists your organization’s reports, automatic and generated. There is no endpoint for a single report, so poll this list and find your report by uid.
The list has no filter for one assessment. List newest first and match
scan_uid. Page by raising page until next is null. The next and previous URLs point at an internal address, so don’t call them.
Poll every 30 seconds or slower. A report moves through these statuses:
Each report in the list has the same fields as the response to Generate a report:
uid: the report ID, for the download and data calls.scan_uid,scan_domain: the assessment and its domain.report_type,format,language,template_uid,baseline_scan_uid: what you asked for.period_start,period_end,allow_partial_period,comparison_scope: the window of an activity or comparison report, as dates in UTC, and the scope of a comparison.breach_primary_domain_only: the scope the report was actually built with, after the assessment’s own setting is applied.status,error_message,created_at,completed_at: progress.file_size_bytes: set once the report is complete.sections_included: the report’s chapters, set once it is complete. It stays[]on a JSON-format full report and on the JSON format of the risk reports built on it.page_count: alwaysnull.privacy_gate,regeneration_required: whether the report was built under the privacy gate, and whether it must be regenerated before you can read it.download_url: an internal address. Don’t call it. Use Download a report.
Download a report
GET /api/hackerview/reports/{report_uid}/download/ streams the file of a completed report.
-OJ saves the file under the name in the Content-Disposition header. --fail keeps curl from saving an error body as the file.
- CSV files use
;as the separator and are UTF-8 with a byte order mark, so spreadsheet programs open them with accents intact. - The file name comes from the assessment, not the report. Every report of one assessment downloads under the same name. When you download several, save each under your own name with
-o. - Errors come back as JSON, never as a file. See Errors.
Regenerate a report
A finished report does not change. Generate it again when:- You changed exclusion rules. Rules are applied when a report is built, so a new report picks up your changes without a new assessment.
- You changed the template it uses.
- It ended
failed. - Reading or downloading it returns
409withcode: "report_regeneration_required", or404withcode: "report_data_missing"or"report_file_missing".
scan_uid and options. It uses no assessment allowance. The earlier report stays in the list. Include rules are the exception: they add hosts while an assessment runs, so they need a new assessment.
Privacy gate. An assessment started with "report_privacy_gate": true builds its automatic reports under the privacy gate: each report is checked for leftover secret material before it is stored, and fails if a check trips. Reports you generate with this endpoint use the platform default, which is off. privacy_gate in the report tells you which applied. A gated report can later return 409 report_regeneration_required when it no longer meets the current check. Generate it again.
Errors
Errors from report generation pass through from the assessment service with their own keys:error, and often a machine-readable code. Branch on code when it is present. Field errors use the field name as the key.
The
409 codes for activity and comparison reports: