Skip to content

Get Report

The Get Report endpoint retrieves the final scan results for a previously submitted file or hash.
Use this endpoint after calling Scan File or Submit Hash.

A report includes threat indicators, risk levels, metadata, and processing details.


Endpoint Summary

Method Endpoint
GET /scan/report/{scanId}
Parameter Type Required Description
scanId String Yes The scan identifier returned by Scan File or Submit Hash.

Request Format

Headers

Header Value
Authorization Bearer YOUR_API_KEY
Content-Type application/json

Example Requests

JavaScript (Node.js)

import axios from "axios";

const scanId = "8fe21ac4-789b-4e21-aa2e-9cbbad11e892";

axios.get(`https://api.cybershield.com/scan/report/${scanId}`, {
  headers: {
    Authorization: "Bearer YOUR_API_KEY"
  }
})
.then(res => console.log("Report:", res.data))
.catch(err => console.error("Error:", err.response?.data || err.message));

Python

import requests

scan_id = "8fe21ac4-789b-4e21-aa2e-9cbbad11e892"

headers = {
    "Authorization": "Bearer YOUR_API_KEY"
}

url = f"https://api.cybershield.com/scan/report/{scan_id}"

response = requests.get(url, headers=headers)
print(response.json())

Example Response (Completed)

{
  "scanId": "8fe21ac4-789b-4e21-aa2e-9cbbad11e892",
  "status": "completed",
  "threatLevel": "medium",
  "score": 62,
  "summary": "Potentially unwanted macros detected.",
  "metadata": {
    "fileName": "invoice.docm",
    "size": 482347
  },
  "indicators": [
    { "type": "macro", "description": "Auto-run macro" },
    { "type": "network", "description": "Suspicious outbound connection pattern" }
  ]
}

Example Response (Still Processing)

{
  "scanId": "8fe21ac4-789b-4e21-aa2e-9cbbad11e892",
  "status": "processing",
  "message": "Scan is in progress. Try again shortly."
}

Common Response Fields

Field Description
scanId The ID used to track this scan.
status processing, completed, or failed.
threatLevel Overall severity rating.
score Numerical threat score (0–100).
summary Short explanation of findings.
metadata File-level details such as name and size.
indicators List of threats, heuristics, or behavioral findings.

Error Handling

Error Code Meaning Fix
400 Bad Request Invalid or missing scanId Verify the scanId value.
401 Unauthorized API key missing or invalid Check your headers.
404 Not Found Scan ID not recognized Ensure the file/hash was submitted correctly.
409 Processing Scan still in progress Retry after a delay.
429 Too Many Requests Rate limit exceeded Throttle requests.

Next Step

If you need to review possible issues or failures:

Error Codes