{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Asset",
  "description": "Asset schema from Palo Alto Networks SaaS Security API",
  "$id": "https://raw.githubusercontent.com/api-evangelist/palo-alto-networks/refs/heads/main/json-schema/saas-security-api-asset-schema.json",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique asset identifier."
    },
    "name": {
      "type": "string",
      "description": "Asset name or filename."
    },
    "type": {
      "type": "string",
      "enum": [
        "file",
        "folder",
        "email",
        "calendar_event",
        "contact"
      ],
      "description": "Asset type."
    },
    "app_id": {
      "type": "string",
      "description": "ID of the SaaS application containing the asset."
    },
    "app_name": {
      "type": "string",
      "description": "Name of the SaaS application."
    },
    "owner": {
      "type": "string",
      "description": "User ID of the asset owner."
    },
    "exposure": {
      "type": "string",
      "enum": [
        "private",
        "internal",
        "external",
        "public"
      ],
      "description": "Current exposure level of the asset."
    },
    "size_bytes": {
      "type": "integer",
      "description": "Asset size in bytes."
    },
    "dlp_violations": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "DLP policy violation names triggered for this asset."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "last_scanned_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
