LogoLogo
DocsSupportDashboard
  • Introduction
    • Data Types
    • Target Filtering
    • Scan Selection
    • Pagination & Sorting
    • Permissions
    • Appendix
  • Authentication
  • Webhooks
  • Events
  • Appendix
    • Targets Filter
    • Date Match
    • IP Range
  • Endpoints
    • Discovery
    • Target
    • Scan
    • Issue
    • Tag
    • Port
    • DNS
    • HTTP
    • Whois
    • Technology
    • Website
    • Acknowledged
    • Event
    • Dark Web
    • Integration
    • PCI
    • Report
    • User
    • Account
    • Security
    • File
    • Work
Powered by GitBook

© 2024 Halo Security

On this page
  • Generate Report
  • Common Parameters
  • Report - Executive Summary
  • Report - Target
  • Report - Issue
  • Report - Security
  • Report - Remediation
  • Report - Dark Web
  • Example

Was this helpful?

  1. Endpoints

Report

Generate PDF reports.

PreviousPCINextUser

Last updated 8 months ago

Was this helpful?

This endpoint is currently in beta and subject to change.

Generate Report

GET https://api.halosecurity.com/api/v1/report/generate.json

Initiate the report generator. After a successful call, the work_id can be monitored to determine when the report is ready. The file_id can then be used to download the file.

{
    "success": 1,
    "work_id": "[ID]",
    "file_id": "[ID]"
}

Common Parameters

Name
Type
Default
Detail

id

String

none

Required. See reports below.

targets

String

none

expire_days

Integer

7

File will be deleted after this many days.

theme

String

dark

The color scheme of the PDF: light or dark .

folder

String

none

Folder name to put the file in.

filename

String

dyanmic

Override the default filename for the report.

Report - Executive Summary

Name
Type
Detail

id

String

executive-summary

Report - Target

Name
Type
Detail

id

String

target

target_id

Integer

Required.

Report - Issue

Name
Type
Detail

id

String

issue

issue_id

Integer

Required.

Report - Security

Name
Type
Detail

id

String

security

scan_id

String

Optional. Defaults to the most recent scan.

Report - Remediation

Name
Type
Detail

id

String

remediation

date_range

String

date_start

String

YYYY-MM-DD

date_end

String

YYYY-MM-DD

Report - Dark Web

Name
Type
Detail

id

String

darkweb

domain_id

Integer

Optional. Supports multiple. Restricts report to these domains.

Example

#!/bin/bash

KEY="YOUR-API-KEY-HERE"
HOST="api.halosecurity.com"

### INITIATE REPORT GENERATOR
JSON=$(curl -s --header "x-apikey: $KEY" "https://$HOST/api/v1/report/generate.json?id=executive-summary")
WORK_ID=$(echo $JSON | jq -r .work_id)
FILE_ID=$(echo $JSON | jq -r .file_id)
echo "report work id $WORK_ID"
echo "report file id $FILE_ID"

### WAIT FOR REPORT COMPLETE
while true; do
   sleep 1
   echo report working
   JSON=$(curl -s --header "x-apikey: $KEY" "https://$HOST/api/v1/work/get.json?id=$WORK_ID")
   DONE=$(echo $JSON | jq -r .work.complete)
   if [ $DONE == 1 ]; then
      echo pdf ready
      break
   fi
done

### WAIT FOR REPORT FILE PROCESSING
while true; do
   sleep 1
   echo report file processing
   JSON=$(curl -s --header "x-apikey: $KEY" "https://$HOST/api/v1/file/get.json?file_id=$FILE_ID")
   DONE=$(echo $JSON | jq -r .file.ready)
   if [ $DONE == 1 ]; then
      echo file ready
      echo $JSON | jq
      URL=$(echo $JSON | jq -r .file.url)
      break
   fi
done

### DOWNLOAD REPORT FILE
echo "Downloading File $URL"
curl --header "x-apikey: $KEY"  $URL > report.pdf
ls -lah report.pdf

Filter targets.

Examples: 7d, lastweek.

https://app.halosecurity.com/user/security/report/
Targets Filter
See Appendix
See Appendix