{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tyk/json-schema/tyk-aggregate-analytics-data-schema.json",
  "title": "AggregateAnalyticsData",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tyk-analytics-api-openapi.yml#/components/schemas/AggregateAnalyticsData",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/ResultUnit"
      },
      "type": [
        "array",
        "null"
      ]
    },
    "pages": {
      "type": "integer"
    }
  },
  "type": "object",
  "$defs": {
    "ResultId": {
      "properties": {
        "alias": {
          "type": "string"
        },
        "api_id": {
          "type": "string"
        },
        "api_name": {
          "type": "string"
        },
        "code": {
          "type": "integer"
        },
        "day": {
          "type": "integer"
        },
        "hour": {
          "type": "integer"
        },
        "iso_country": {
          "type": "string"
        },
        "key": {
          "type": "string"
        },
        "month": {
          "type": "integer"
        },
        "path": {
          "type": "string"
        },
        "queries": {
          "additionalProperties": {
            "type": "integer"
          },
          "type": "object"
        },
        "url": {
          "type": "string"
        },
        "year": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "ResultUnit": {
      "properties": {
        "error": {
          "type": "integer"
        },
        "hits": {
          "type": "integer"
        },
        "id": {
          "$ref": "#/$defs/ResultId"
        },
        "last_hit": {
          "format": "date-time",
          "type": "string"
        },
        "latency": {
          "format": "double",
          "type": "number"
        },
        "max_latency": {
          "format": "int64",
          "type": "integer"
        },
        "max_upstream_latency": {
          "format": "int64",
          "type": "integer"
        },
        "min_latency": {
          "format": "int64",
          "type": "integer"
        },
        "min_upstream_latency": {
          "format": "int64",
          "type": "integer"
        },
        "request_time": {
          "format": "double",
          "type": "number"
        },
        "success": {
          "type": "integer"
        },
        "upstream_latency": {
          "format": "double",
          "type": "number"
        }
      },
      "type": "object"
    }
  }
}