{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/api-video/json-schema/api-video-analytics-metrics-breakdown-response-schema.json",
  "title": "Analytics response for metrics breakdown by dimension",
  "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-metrics-breakdown-response",
  "type": "object",
  "properties": {
    "context": {
      "type": "object",
      "properties": {
        "metric": {
          "description": "Returns the metric and relevant parameters you selected.",
          "type": "string",
          "enum": [
            "play",
            "play-rate",
            "start",
            "end",
            "impression",
            "ccv-average",
            "ccv-peak",
            "unique-ccv-average",
            "unique-ccv-peak",
            "view-3",
            "view-5",
            "view-10",
            "view-30",
            "unique-view",
            "unique-view-3",
            "unique-view-5",
            "unique-view-10",
            "unique-view-30"
          ]
        },
        "breakdown": {
          "description": "Returns the dimension you selected.",
          "type": "string",
          "enum": [
            "media-id",
            "media-type",
            "continent",
            "country",
            "device-type",
            "operating-system",
            "browser"
          ]
        },
        "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": {
      "description": "Returns an array of dimensions and their respective metrics.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "dimensionValue": {
            "description": "Returns a specific value for the dimension you selected, based on the data. For example if you select `continent` as a dimension, then `dimensionValue` returns values like `EU` or \"AZ\".",
            "type": "string"
          },
          "metricValue": {
            "description": "Returns the data for a specific dimension value.",
            "type": "number",
            "format": "float"
          }
        }
      }
    },
    "pagination": {
      "$ref": "#/$defs/pagination"
    }
  },
  "required": [
    "context",
    "data",
    "pagination"
  ],
  "$defs": {
    "pagination": {
      "title": "Pagination",
      "required": [
        "links"
      ],
      "type": "object",
      "properties": {
        "itemsTotal": {
          "type": "integer",
          "description": "Total number of items that exist.",
          "readOnly": true
        },
        "pagesTotal": {
          "type": "integer",
          "description": "Number of items listed in the current page.",
          "readOnly": true
        },
        "pageSize": {
          "type": "integer",
          "description": "Maximum number of item per page.",
          "readOnly": true
        },
        "currentPage": {
          "type": "integer",
          "description": "The current page index.",
          "readOnly": true
        },
        "currentPageItems": {
          "type": "integer",
          "description": "The number of items on the current page.",
          "readOnly": true
        },
        "links": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/pagination-link"
          }
        }
      }
    },
    "pagination-link": {
      "title": "PaginationLink",
      "type": "object",
      "properties": {
        "rel": {
          "type": "string"
        },
        "uri": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  }
}