{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/palo-alto-networks/main/json-schema/palo-alto-networks-scan-response-schema.json",
  "title": "ScanResponse",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/palo-alto-networks-scan-api-openapi.yml#/components/schemas/ScanResponse",
  "type": "object",
  "properties": {
    "scan_id": {
      "type": "string",
      "description": "Unique identifier of the scan."
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "processing",
        "completed",
        "error"
      ],
      "description": "Current or final status of the scan."
    },
    "report_id": {
      "type": "string",
      "description": "Identifier for the detailed scan report."
    },
    "scan_category": {
      "type": "string",
      "description": "Highest severity threat category detected."
    },
    "results": {
      "type": "array",
      "description": "Per-content scan results corresponding to each submitted content item.",
      "items": {
        "$ref": "#/$defs/ContentScanResult"
      }
    },
    "tr_id": {
      "type": "string",
      "description": "Transaction ID echoed from the request if provided."
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the scan was submitted."
    },
    "completed_at": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the scan completed."
    }
  },
  "$defs": {
    "ContentScanResult": {
      "type": "object",
      "properties": {
        "prompt_detected": {
          "type": "object",
          "description": "Threats detected in the prompt field.",
          "properties": {
            "url_cats": {
              "type": "boolean",
              "description": "Malicious URL categories detected in prompt."
            },
            "dlp": {
              "type": "boolean",
              "description": "Data loss prevention triggers in prompt."
            },
            "injection": {
              "type": "boolean",
              "description": "Prompt injection detected."
            }
          }
        },
        "response_detected": {
          "type": "object",
          "description": "Threats detected in the response field.",
          "properties": {
            "url_cats": {
              "type": "boolean",
              "description": "Malicious URL categories detected in response."
            },
            "dlp": {
              "type": "boolean",
              "description": "Data loss prevention triggers in response."
            },
            "toxic_content": {
              "type": "boolean",
              "description": "Toxic or harmful content detected in response."
            }
          }
        },
        "verdict": {
          "type": "string",
          "enum": [
            "benign",
            "malicious"
          ],
          "description": "Overall verdict for this content pair."
        },
        "action": {
          "type": "string",
          "enum": [
            "allow",
            "block"
          ],
          "description": "Action taken based on the security profile configuration."
        }
      }
    }
  }
}