{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/api-video/json-schema/api-video-analytics-aggregated-metrics-response-schema.json",
  "title": "Analytics response for aggregated metrics",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api-video-analytics-api-openapi.yml#/components/schemas/analytics-aggregated-metrics-response",
  "type": "object",
  "properties": {
    "context": {
      "type": "object",
      "properties": {
        "metric": {
          "description": "Returns the metric and relevant parameters you selected.",
          "type": "string",
          "enum": [
            "play",
            "start",
            "end",
            "impression",
            "impression-time",
            "watch-time",
            "ccv",
            "unique-ccv",
            "view-3",
            "view-5",
            "view-10",
            "view-30",
            "unique-view",
            "unique-view-3",
            "unique-view-5",
            "unique-view-10",
            "unique-view-30"
          ]
        },
        "aggregation": {
          "description": "Returns the aggregation you selected.",
          "type": "string",
          "enum": [
            "count",
            "rate",
            "total",
            "average",
            "sum"
          ]
        },
        "timeframe": {
          "description": "Returns the starting and ending date-times of the period you want analytics for.",
          "type": "object",
          "properties": {
            "from": {
              "description": "Returns the starting date-time of the period you want analytics for in ATOM date-time format.",
              "type": "string",
              "format": "date-time"
            },
            "to": {
              "description": "Returns the starting date-time of the period you want analytics for in ATOM date-time format.",
              "type": "string",
              "format": "date-time"
            }
          }
        }
      }
    },
    "data": {
      "type": "number",
      "format": "float"
    }
  },
  "required": [
    "context",
    "data"
  ]
}