---
updatedAt: 2026-03-30T13:36:55.000Z
agentTools:
  siteIndex: https://developer.bitmovin.com/llms.txt
  projectIndex: https://developer.bitmovin.com/playback/llms.txt
---

# Avg

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Bitmovin API Reference",
    "description": "Bitmovins API Reference Description",
    "version": "3.1.1",
    "termsOfService": "https://bitmovin.com",
    "contact": {
      "name": "Bitmovin Inc",
      "url": "https://bitmovin.com",
      "email": "support@bitmovin.com"
    }
  },
  "servers": [
    {
      "url": "https://api.bitmovin.com/v1",
      "description": "Bitmovin Server",
      "variables": {}
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    },
    {
      "ApiKeyAuth": [],
      "TenantOrgId": []
    }
  ],
  "paths": {
    "/analytics/ads/queries/avg": {
      "post": {
        "tags": [
          "Ads"
        ],
        "summary": "Avg",
        "operationId": "PostAdAnalyticsQueriesAvg",
        "requestBody": {
          "description": "Analytics Query Object",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AdAnalyticsAvgQueryRequest"
              },
              "example": {
                "start": "2021-06-10T20:09:23.69Z",
                "end": "2021-06-11T20:09:23.69Z",
                "licenseKey": "YOUR_ANALYTICS_LICENSE_KEY",
                "filters": {
                  "name": "BROWSER",
                  "operator": "EQ",
                  "value": "Chrome"
                },
                "dimension": "PLAYER_STARTUPTIME",
                "groupBy": [
                  "COUNTRY"
                ],
                "orderBy": {
                  "name": "FUNCTION",
                  "order": "DESC"
                },
                "limit": 50,
                "offset": 0
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ResponseEnvelope"
                    },
                    {
                      "properties": {
                        "data": {
                          "properties": {
                            "result": {
                              "allOf": [
                                {
                                  "$ref": "#/components/schemas/AnalyticsResponse"
                                },
                                {
                                  "description": "Service specific result"
                                }
                              ]
                            }
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "description": "Your Bitmovin API key",
        "name": "X-Api-Key",
        "in": "header"
      },
      "TenantOrgId": {
        "type": "apiKey",
        "description": "Your Bitmovin account organization",
        "name": "X-Tenant-Org-Id",
        "in": "header"
      }
    },
    "schemas": {
      "BitmovinResponse": {
        "title": "BitmovinResponse",
        "required": [
          "id"
        ],
        "properties": {
          "id": {
            "type": "string",
            "readOnly": true,
            "description": "Id of the resource",
            "example": "cb90b80c-8867-4e3b-8479-174aa2843f62"
          }
        }
      },
      "AdAnalyticsAttribute": {
        "title": "AdAnalyticsAttribute",
        "type": "string",
        "enum": [
          "AD_IMPRESSION_ID",
          "AD_CLICKTHROUGH_URL",
          "AD_DESCRIPTION",
          "AD_DURATION",
          "AD_FALLBACK_INDEX",
          "AD_ID",
          "AD_ID_PLAYER",
          "AD_IS_PERSISTENT",
          "AD_MODULE",
          "AD_OFFSET",
          "AD_PLAYBACK_HEIGHT",
          "AD_PLAYBACK_WIDTH",
          "AD_POD_POSITION",
          "AD_POSITION",
          "AD_PRELOAD_OFFSET",
          "AD_REPLACE_CONTENT_DURATION",
          "AD_SCHEDULE_TIME",
          "AD_SKIP_AFTER",
          "AD_SKIPPABLE",
          "AD_STARTUP_TIME",
          "AD_SYSTEM",
          "AD_TAG_PATH",
          "AD_TAG_SERVER",
          "AD_TAG_TYPE",
          "AD_TAG_URL",
          "AD_TITLE",
          "AD_WRAPPER_ADS_COUNT",
          "ADVERTISER_NAME",
          "ANALYTICS_VERSION",
          "API_FRAMEWORK",
          "AUDIO_BITRATE",
          "AUDIO_CODEC",
          "AUTOPLAY",
          "BROWSER",
          "BROWSER_VERSION_MAJOR",
          "CDN_PROVIDER",
          "CITY",
          "CLICK_PERCENTAGE",
          "CLICK_POSITION",
          "CLICKED",
          "CLIENT_TIME",
          "CLOSE_PERCENTAGE",
          "CLOSE_POSITION",
          "CLOSED",
          "COMPLETED",
          "COUNTRY",
          "CREATIVE_AD_ID",
          "CREATIVE_ID",
          "CUSTOM_DATA_1",
          "CUSTOM_DATA_2",
          "CUSTOM_DATA_3",
          "CUSTOM_DATA_4",
          "CUSTOM_DATA_5",
          "CUSTOM_DATA_6",
          "CUSTOM_DATA_7",
          "CUSTOM_DATA_8",
          "CUSTOM_DATA_9",
          "CUSTOM_DATA_10",
          "CUSTOM_DATA_11",
          "CUSTOM_DATA_12",
          "CUSTOM_DATA_13",
          "CUSTOM_DATA_14",
          "CUSTOM_DATA_15",
          "CUSTOM_DATA_16",
          "CUSTOM_DATA_17",
          "CUSTOM_DATA_18",
          "CUSTOM_DATA_19",
          "CUSTOM_DATA_20",
          "CUSTOM_DATA_21",
          "CUSTOM_DATA_22",
          "CUSTOM_DATA_23",
          "CUSTOM_DATA_24",
          "CUSTOM_DATA_25",
          "CUSTOM_DATA_26",
          "CUSTOM_DATA_27",
          "CUSTOM_DATA_28",
          "CUSTOM_DATA_29",
          "CUSTOM_DATA_30",
          "CUSTOM_USER_ID",
          "DAY",
          "DEAL_ID",
          "DEVICE_CLASS",
          "DEVICE_TYPE",
          "DOMAIN",
          "ERROR_CODE",
          "ERROR_PERCENTAGE",
          "ERROR_POSITION",
          "EXIT_POSITION",
          "EXPERIMENT_NAME",
          "HOUR",
          "IP_ADDRESS",
          "IS_LINEAR",
          "ISP",
          "LANGUAGE",
          "LICENSE_KEY",
          "MANIFEST_DOWNLOAD_TIME",
          "MEDIA_PATH",
          "MEDIA_SERVER",
          "MEDIA_URL",
          "MIDPOINT",
          "MIN_SUGGESTED_DURATION",
          "MINUTE",
          "MONTH",
          "OPERATINGSYSTEM",
          "OPERATINGSYSTEM_VERSION_MAJOR",
          "PAGE_LOAD_TIME",
          "PAGE_LOAD_TYPE",
          "PATH",
          "PERCENTAGE_IN_VIEWPORT",
          "PLATFORM",
          "PLAY_PERCENTAGE",
          "PLAYER",
          "PLAYER_KEY",
          "PLAYER_STARTUPTIME",
          "PLAYER_TECH",
          "PLAYER_VERSION",
          "QUARTILE_1",
          "QUARTILE_3",
          "REGION",
          "SCALE_FACTOR",
          "SCREEN_HEIGHT",
          "SCREEN_WIDTH",
          "SCREEN_ORIENTATION",
          "SIZE",
          "SKIP_PERCENTAGE",
          "SKIP_POSITION",
          "SKIPPED",
          "STARTED",
          "STREAM_FORMAT",
          "SURVEY_URL",
          "TIME",
          "TIME_IN_VIEWPORT",
          "TIME_PLAYED",
          "UNIVERSAL_AD_ID_REGISTRY",
          "UNIVERSAL_AD_ID_VALUE",
          "USER_ID",
          "VIDEO_BITRATE",
          "VIDEO_CODEC",
          "VIDEO_ID",
          "VIDEO_IMPRESSION_ID",
          "VIDEO_TITLE",
          "VIDEO_WINDOW_HEIGHT",
          "VIDEO_WINDOW_WIDTH"
        ]
      },
      "AdAnalyticsAvgQueryRequest": {
        "title": "AdAnalyticsAvgQueryRequest",
        "allOf": [
          {
            "$ref": "#/components/schemas/AdAnalyticsQueryRequest"
          }
        ]
      },
      "AdAnalyticsQueryRequest": {
        "title": "AdAnalyticsQueryRequest",
        "required": [
          "dimension",
          "licenseKey"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/AnalyticsQueryTimeframe"
          },
          {
            "properties": {
              "licenseKey": {
                "type": "string",
                "description": "Analytics license key",
                "example": "YOUR_ANALYTICS_LICENSE_KEY"
              },
              "filters": {
                "type": "array",
                "description": "Analytics Query Filters\n\nEach filter requires 3 properties: name, operator and value. \n\nValid operators are [IN, EQ, NE, LT, LTE, GT, GTE, CONTAINS, NOTCONTAINS]\n",
                "items": {
                  "$ref": "#/components/schemas/AdAnalyticsAbstractFilter"
                }
              },
              "orderBy": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AdAnalyticsOrderByEntry"
                }
              },
              "dimension": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AdAnalyticsAttribute"
                  }
                ]
              },
              "interval": {
                "example": "HOUR",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/AnalyticsInterval"
                  }
                ]
              },
              "groupBy": {
                "type": "array",
                "example": [
                  "COUNTRY"
                ],
                "items": {
                  "$ref": "#/components/schemas/AdAnalyticsAttribute"
                }
              },
              "limit": {
                "type": "integer",
                "format": "int64",
                "description": "Maximum number of rows returned (max. 200)",
                "example": 200,
                "default": 200
              },
              "offset": {
                "type": "integer",
                "format": "int64",
                "description": "Offset of data",
                "example": 0,
                "default": 0
              }
            }
          }
        ]
      },
      "AdAnalyticsAbstractFilter": {
        "title": "AdAnalyticsAbstractFilter",
        "required": [
          "name",
          "operator"
        ],
        "properties": {
          "name": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AdAnalyticsAttribute"
              }
            ]
          }
        },
        "discriminator": {
          "propertyName": "operator",
          "mapping": {
            "IN": "#/components/schemas/AdAnalyticsInFilter",
            "EQ": "#/components/schemas/AdAnalyticsEqualFilter",
            "NE": "#/components/schemas/AdAnalyticsNotEqualFilter",
            "LT": "#/components/schemas/AdAnalyticsLessThanFilter",
            "LTE": "#/components/schemas/AdAnalyticsLessThanOrEqualFilter",
            "GT": "#/components/schemas/AdAnalyticsGreaterThanFilter",
            "GTE": "#/components/schemas/AdAnalyticsGreaterThanOrEqualFilter",
            "CONTAINS": "#/components/schemas/AdAnalyticsContainsFilter",
            "NOTCONTAINS": "#/components/schemas/AdAnalyticsNotContainsFilter"
          }
        },
        "x-discriminator-enum": {
          "$ref": "#/components/schemas/AnalyticsQueryOperator"
        }
      },
      "AdAnalyticsInFilter": {
        "title": "AdAnalyticsInFilter",
        "required": [
          "value"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/AdAnalyticsAbstractFilter"
          },
          {
            "properties": {
              "name": {
                "example": "BROWSER"
              },
              "value": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    }
                  ],
                  "description": "The values to compare to the property specified by the name"
                },
                "example": [
                  "Chrome",
                  "Edge",
                  "Safari"
                ]
              }
            }
          }
        ]
      },
      "AdAnalyticsContainsFilter": {
        "title": "AdAnalyticsContainsFilter",
        "required": [
          "value"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/AdAnalyticsAbstractFilter"
          },
          {
            "properties": {
              "name": {
                "example": "PATH"
              },
              "value": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ],
                "example": "part/of/path"
              }
            }
          }
        ]
      },
      "AdAnalyticsNotContainsFilter": {
        "title": "AdAnalyticsNotContainsFilter",
        "required": [
          "value"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/AdAnalyticsAbstractFilter"
          },
          {
            "properties": {
              "name": {
                "example": "PATH"
              },
              "value": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ],
                "example": "part/of/excluded/paths"
              }
            }
          }
        ]
      },
      "AdAnalyticsEqualFilter": {
        "title": "AdAnalyticsEqualFilter",
        "required": [
          "value"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/AdAnalyticsAbstractFilter"
          },
          {
            "properties": {
              "name": {
                "example": "AD_IMPRESSION_ID"
              },
              "value": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ],
                "example": "cb90b80c-8867-4e3b-8479-174aa2843f62"
              }
            }
          }
        ]
      },
      "AdAnalyticsGreaterThanFilter": {
        "title": "AdAnalyticsGreaterThanFilter",
        "required": [
          "value"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/AdAnalyticsAbstractFilter"
          },
          {
            "properties": {
              "name": {
                "example": "PLAY_PERCENTAGE"
              },
              "value": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ],
                "example": 50
              }
            }
          }
        ]
      },
      "AdAnalyticsGreaterThanOrEqualFilter": {
        "title": "AdAnalyticsGreaterThanOrEqualFilter",
        "required": [
          "value"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/AdAnalyticsAbstractFilter"
          },
          {
            "properties": {
              "name": {
                "example": "PLAY_PERCENTAGE"
              },
              "value": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ],
                "example": 50
              }
            }
          }
        ]
      },
      "AdAnalyticsLessThanFilter": {
        "title": "AdAnalyticsLessThanFilter",
        "required": [
          "value"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/AdAnalyticsAbstractFilter"
          },
          {
            "properties": {
              "name": {
                "example": "PLAY_PERCENTAGE"
              },
              "value": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ],
                "example": 100
              }
            }
          }
        ]
      },
      "AdAnalyticsLessThanOrEqualFilter": {
        "title": "AdAnalyticsLessThanOrEqualFilter",
        "required": [
          "value"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/AdAnalyticsAbstractFilter"
          },
          {
            "properties": {
              "name": {
                "example": "PLAY_PERCENTAGE"
              },
              "value": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ],
                "example": 50
              }
            }
          }
        ]
      },
      "AdAnalyticsNotEqualFilter": {
        "title": "AdAnalyticsNotEqualFilter",
        "required": [
          "value"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/AdAnalyticsAbstractFilter"
          },
          {
            "properties": {
              "name": {
                "example": "ERROR_CODE"
              },
              "value": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "number"
                  }
                ],
                "example": 3000
              }
            }
          }
        ]
      },
      "AdAnalyticsOrderByEntry": {
        "title": "AdAnalyticsOrderByEntry",
        "required": [
          "name",
          "order"
        ],
        "properties": {
          "name": {
            "example": "COUNTRY",
            "$ref": "#/components/schemas/AdAnalyticsAttribute"
          },
          "order": {
            "$ref": "#/components/schemas/AnalyticsOrder"
          }
        }
      },
      "AnalyticsColumnLabel": {
        "title": "AnalyticsColumnLabel",
        "properties": {
          "key": {
            "type": "string",
            "example": "IMPRESSION_ID"
          },
          "label": {
            "type": "string",
            "example": "Impression ID"
          }
        }
      },
      "AnalyticsContextDescription": {
        "title": "AnalyticsContextDescription",
        "properties": {
          "label": {
            "type": "string",
            "example": "Plays"
          },
          "description": {
            "type": "string",
            "example": "Number of Plays"
          }
        }
      },
      "AnalyticsInterval": {
        "title": "AnalyticsInterval",
        "type": "string",
        "enum": [
          "MINUTE",
          "HOUR",
          "DAY",
          "MONTH"
        ]
      },
      "AnalyticsQueryOperator": {
        "title": "AnalyticsQueryOperator",
        "type": "string",
        "enum": [
          "IN",
          "EQ",
          "NE",
          "LT",
          "LTE",
          "GT",
          "GTE",
          "CONTAINS",
          "NOTCONTAINS"
        ]
      },
      "AnalyticsOrder": {
        "title": "AnalyticsOrder",
        "type": "string",
        "enum": [
          "ASC",
          "DESC"
        ]
      },
      "AnalyticsQueryTimeframe": {
        "title": "AnalyticsQueryTimeframe",
        "properties": {
          "start": {
            "type": "string",
            "format": "date-time",
            "description": "Start of timeframe which is queried in UTC format.",
            "example": "2019-06-25T20:09:23.69Z"
          },
          "end": {
            "type": "string",
            "format": "date-time",
            "description": "End of timeframe which is queried in UTC format.",
            "example": "2019-06-26T20:09:23.69Z"
          }
        }
      },
      "AnalyticsResponse": {
        "title": "AnalyticsResponse",
        "properties": {
          "rows": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "rowCount": {
            "type": "integer",
            "format": "int64",
            "description": "Number of rows returned"
          },
          "columnLabels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsColumnLabel"
            }
          },
          "contextDescription": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsContextDescription"
            }
          }
        }
      },
      "Link": {
        "title": "Link",
        "required": [
          "href"
        ],
        "properties": {
          "href": {
            "type": "string",
            "description": "webpage target URL",
            "example": "https://bitmovin.com/encoding-documentation/bitmovin-api/#/reference/encoding/manifests/add-period"
          },
          "title": {
            "type": "string",
            "description": "Short description of the linked page",
            "example": "how to add a period to a manifest"
          }
        }
      },
      "Message": {
        "title": "Message",
        "required": [
          "type",
          "text"
        ],
        "allOf": [
          {
            "$ref": "#/components/schemas/BitmovinResponse"
          },
          {
            "properties": {
              "type": {
                "description": "Message type giving a hint on the importance of the message (log level)",
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MessageType"
                  }
                ]
              },
              "text": {
                "type": "string",
                "description": "Message text",
                "example": "field must not be empty"
              },
              "field": {
                "type": "string",
                "description": "Name of the field to which the message is referring to",
                "example": "manifestId"
              },
              "links": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Link"
                },
                "description": "collection of links to webpages containing further information on the topic"
              },
              "more": {
                "type": "object",
                "description": "Service-specific information"
              },
              "date": {
                "type": "string",
                "format": "date-time",
                "description": "Timestamp when the message occurred",
                "example": "2016-06-25T20:09:23.69Z"
              }
            }
          }
        ]
      },
      "MessageType": {
        "title": "MessageType",
        "type": "string",
        "enum": [
          "ERROR",
          "WARNING",
          "INFO",
          "DEBUG",
          "TRACE"
        ]
      },
      "ResponseEnvelope": {
        "title": "ResponseEnvelope",
        "required": [
          "requestId",
          "status",
          "data"
        ],
        "properties": {
          "requestId": {
            "type": "string",
            "readOnly": true,
            "description": "Unique correlation id",
            "example": "6d84e126-d10c-4e52-bbfb-bd4c92bc8333"
          },
          "status": {
            "description": "Response status information",
            "readOnly": true,
            "example": "SUCCESS",
            "allOf": [
              {
                "$ref": "#/components/schemas/ResponseStatus"
              }
            ]
          },
          "data": {
            "description": "Response information",
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ResultWrapper"
              }
            ]
          },
          "more": {
            "type": "object",
            "description": "Additional endpoint specific information"
          }
        }
      },
      "ResponseError": {
        "title": "ResponseError",
        "required": [
          "requestId",
          "status",
          "data"
        ],
        "properties": {
          "requestId": {
            "type": "string",
            "readOnly": true,
            "description": "Unique correlation id",
            "example": "6d84e126-d10c-4e52-bbfb-bd4c92bc8333"
          },
          "status": {
            "description": "Response status information",
            "readOnly": true,
            "example": "ERROR",
            "allOf": [
              {
                "$ref": "#/components/schemas/ResponseStatus"
              }
            ]
          },
          "data": {
            "description": "Response information",
            "readOnly": true,
            "allOf": [
              {
                "$ref": "#/components/schemas/ResponseErrorData"
              }
            ]
          }
        }
      },
      "ResponseErrorData": {
        "title": "ResponseErrorData",
        "required": [
          "code",
          "message",
          "developerMessage"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "readOnly": true,
            "description": "Contains an error code as defined in https://bitmovin.com/encoding-documentation/bitmovin-api/#/introduction/api-error-codes\n",
            "example": 1005
          },
          "message": {
            "type": "string",
            "readOnly": true,
            "description": "General error message"
          },
          "developerMessage": {
            "type": "string",
            "readOnly": true,
            "description": "More detailed message meant for developers"
          },
          "links": {
            "type": "array",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/Link"
            },
            "description": "collection of links to webpages containing further information on the topic"
          },
          "details": {
            "type": "array",
            "readOnly": true,
            "items": {
              "$ref": "#/components/schemas/Message"
            },
            "description": "collection of messages containing more detailed information on the cause of the error"
          }
        }
      },
      "ResponseStatus": {
        "title": "ResponseStatus",
        "type": "string",
        "enum": [
          "SUCCESS",
          "ERROR"
        ]
      },
      "ResultWrapper": {
        "title": "ResultWrapper",
        "properties": {
          "result": {
            "type": "object",
            "readOnly": true
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```