{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "AggregationResponse",
  "description": "AggregationResponse schema from Palo Alto Networks SASE Aggregate Monitoring API",
  "$id": "https://raw.githubusercontent.com/api-evangelist/palo-alto-networks/refs/heads/main/json-schema/sase-aggregate-monitoring-api-aggregation-response-schema.json",
  "type": "object",
  "properties": {
    "total": {
      "type": "integer",
      "description": "Total number of matching records before count limit."
    },
    "count": {
      "type": "integer",
      "description": "Number of records returned."
    },
    "time_range": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "format": "date-time"
        },
        "end": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "data": {
      "type": "array",
      "description": "Array of result objects. Schema varies by query type and group_by dimensions.",
      "items": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "histogram": {
      "type": "array",
      "description": "Time-series histogram buckets when histogram configuration was specified in the query.",
      "items": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "count": {
            "type": "integer"
          },
          "values": {
            "type": "object",
            "additionalProperties": true
          }
        }
      }
    }
  }
}
