diff --git a/oas_apivideo.yaml b/oas_apivideo.yaml index 8a5f25ab..d53e6a9c 100644 --- a/oas_apivideo.yaml +++ b/oas_apivideo.yaml @@ -412,7 +412,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -655,7 +655,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -1073,7 +1073,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -1375,7 +1375,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -1690,7 +1690,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -1836,7 +1836,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -2045,7 +2045,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -2346,7 +2346,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -2646,7 +2646,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -2890,7 +2890,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -3196,7 +3196,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -3539,7 +3539,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -3801,7 +3801,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -4077,7 +4077,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -4332,7 +4332,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -4568,7 +4568,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -4848,7 +4848,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -5071,7 +5071,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -5406,7 +5406,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -5644,7 +5644,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -5893,7 +5893,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -6176,7 +6176,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -6528,7 +6528,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -6786,7 +6786,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -7091,7 +7091,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -7397,7 +7397,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -7694,7 +7694,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -8003,7 +8003,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -8292,7 +8292,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -8554,7 +8554,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -8837,7 +8837,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -9093,7 +9093,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -9353,7 +9353,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -9689,7 +9689,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -9951,7 +9951,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -10299,7 +10299,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -10536,7 +10536,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -10798,7 +10798,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -11146,7 +11146,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -11409,7 +11409,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -11560,80 +11560,109 @@ paths: code: | // First install the api client: https://github.com/apivideo/api.video-swift-client#getting-started // Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/PlayerThemesAPI.md#deleteLogo - '/analytics/videos/plays': + '/data/metrics/{metric}/{aggregation}': get: tags: - - Analytics - summary: Get play events for video - description: | - Retrieve filtered analytics about the number of plays for your videos in a project. - - This endpoint will be deprecated with the release of Analytics v2.0. - operationId: GET_analytics-videos-plays + - Analytics v2.0 beta + summary: Retrieve aggregated metrics + description: Retrieve time-based and countable metrics like average watch time or the number of impressions over a certain period of time. + operationId: GET_aggregated-metrics parameters: - - name: from - in: query + - name: metric + in: path description: | - Use this query parameter to set the start date for the time period that you want analytics for. - - The API returns analytics data including the day you set in `from`. - - The date you set must be **within the last 30 days**. - - The value you provide must follow the `YYYY-MM-DD` format. + Use this path parameter to select a metric that you want analytics for. + + - `play` is the number of times your content has been played. You can use the aggregations `count`, `rate`, and `total` with the `play` metric. + - `start` is the number of times playback was started. You can use the aggregation `count` with this metric. + - `end` is the number of times playback has ended with the content watch until the end. You can use the aggregation `count` with this metric. + - `impression` is the number of times your content has been loaded and was ready for playback. You can use the aggregation `count` with this metric. + - `impression-time` is the time in milliseconds that your content was loading for until the first video frame is displayed. You can use the aggregations `average` and `sum` with this metric. + - `watch-time` is the cumulative time in seconds that the user has spent watching your content. You can use the aggregations `average` and `sum` with this metric. required: true - style: form - explode: true + style: simple + explode: false schema: type: string - format: date - example: 2023-06-01 - - name: to + enum: + - play + - start + - end + - impression + - impression-time + - watch-time + - name: aggregation + in: path + description: | + Use this path parameter to define a way of collecting data for the metric that you want analytics for. + + - `count` returns the overall number of events for the `play` metric. + - `rate` returns the ratio that calculates the number of plays your content receives divided by its impressions. This aggregation can be used only with the `play` metric. + - `total` calculates the total number of events for the `play` metric. + - `average` calculates an average value for the selected metric. + - `sum` adds up the total value of the select metric. + style: simple + explode: false + required: true + schema: + type: string + enum: + - count + - rate + - total + - average + - sum + - name: from in: query description: | - Use this optional query parameter to set the end date for the time period that you want analytics for. - - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. - - The date you set must be **within the last 30 days**. - - The value you provide must follow the `YYYY-MM-DD` format. - required: false + Use this query parameter to define the starting date-time of the period you want analytics for. + + - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. + - The maximum value is 365 days ago, and April 1st 2024. + - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` + - The API ignores this parameter when you call `/data/metrics/play/total`. style: form - explode: true + explode: false schema: type: string - format: date - example: 2023-06-10 - - name: dimension + format: date-time + example: 2024-02-05T00:00:00+01:00 + - name: to in: query - description: |- - Use this query parameter to define the dimension that you want analytics for. - - `videoId`: Returns analytics based on the public video identifiers. - - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. - - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). - - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. - - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. - - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. - required: true + description: | + Use this query parameter to define the ending date-time of the period you want analytics for. + + - If you do not set a value for `to`, the default assigned value is `now`. + - The API ignores this parameter when you call `/data/metrics/play/total`. + - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. style: form explode: false schema: type: string - enum: - - videoId - - emittedAt - - country - - deviceType - - operatingSystem - - browser - example: browser - - name: filter + format: date-time + example: 2024-02-06T00:00:00+01:00 + - name: filterBy in: query - description: Use this query parameter to filter your results to a specific - video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. - required: false + description: | + Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. + + - If you do not set a value for `filterBy`, the API returns the full dataset for your project. + - The API only accepts the `mediaId` and `mediaType` filters when you call `/data/metrics/play/total`. + + These are the available breakdown dimensions: + + - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. + - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. + - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. + - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). + - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. + - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. + - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. style: form - explode: false + explode: true schema: type: string - example: videoId:vi3q7HxhApxRF1c8F8r6VeaI - - $ref: '#/components/parameters/current-page' - - $ref: '#/components/parameters/page-size' + example: filterBy[continent]=EU&filterBy[country]=FR&filterBy[browser]=Safari&filterBy[browser]=Firefox responses: '200': headers: @@ -11653,79 +11682,17 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/analytics-plays-response' + $ref: '#/components/schemas/analytics-aggregated-metrics-response' examples: - Dimension is videoId: - description: Breakdown video-plays by videoId for a project. - value: - data: - - value: vi3q7HxhApxRF1c8F8r6VeaI - plays: 100 - - value: vi3q7HxhApxRF1c8F8r6VeaF - plays: 10 - - value: vi3q7HxhApxRF1c8F8r6VeaH - plays: 1 - pagination: - currentPage: 1 - currentPageItems: 3 - pageSize: 25 - pagesTotal: 1 - itemsTotal: 3 - links: - - rel: self - uri: "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25" - - rel: first - uri: "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25" - - rel: last - uri: "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25" - Dimension is country: - description: Breakdown video-plays by country for a project, with pagination set. - value: - data: - - value: france - plays: 100 - - value: united states - plays: 10 - - value: spain - plays: 1 - pagination: - currentPage: 1 - currentPageItems: 2 - pageSize: 2 - pagesTotal: 2 - itemsTotal: 3 - links: - - rel: self - uri: "/analytics/videos/plays?dimension=country¤tPage=1&pageSize=2" - - rel: first - uri: "/analytics/videos/plays?dimension=country¤tPage=1&pageSize=2" - - rel: next - uri: "/analytics/videos/plays?dimension=country¤tPage=2&pageSize=1" - - rel: last - uri: "/analytics/videos/plays?dimension=country¤tPage=2&pageSize=1" - Dimension is emittedAt, filtered for a videoId: - description: Breakdown video-plays by the time of play events, for a specific video. - value: - data: - - value: 2023-06-10T10:00:00.000Z - plays: 100 - - value: 2023-06-10T11:00:00.000Z - plays: 10 - - value: 2023-06-10T12:00:00.000Z - plays: 1 - pagination: - currentPage: 1 - currentPageItems: 3 - pageSize: 25 - pagesTotal: 1 - itemsTotal: 3 - links: - - rel: self - uri: "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - - rel: first - uri: "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" - - rel: last - uri: "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" + Impression time from a certain date: + value: + context: + metric: impression + aggregation: count + timeframe: + from: 2024-05-28T11:15:07+00:00 + to: 2024-05-29T11:15:07+00:00 + data: 346.5 '400': headers: X-RateLimit-Limit: @@ -11747,79 +11714,22 @@ paths: title: Bad request error $ref: '#/components/schemas/analytics-plays-400-error' examples: - Missing parameter: - description: This error occurs when a required query-parameter is missing. + Invalid attribute: + description: This error occurs when a parameter you provided does not exist, or isn't correct for this endpoint, has an invalid value. value: type: https://docs.api.video/reference/invalid-attribute title: An attribute is invalid. status: 400 detail: This value must be of type string. - name: dimension - Invalid parameter: - description: This error occurs when a required query-parameter format is invalid. - value: - type: https://docs.api.video/reference/request-invalid-query-parameter - title: A query parameter is invalid. - status: 400 - detail: 'This value must be of the following structure(s): videoId:{videoId}' - name: filter - Dimension not allowed: - description: This error occurs when the dimension you requested is not allowed for the endpoint. For example, the dimension `videoId` is not allowed for the `/live-streams` endpoint. - value: - type: https://docs.api.video/reference/request-invalid-query-parameter - title: A query parameter is invalid. - status: 400 - detail: 'This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser' - name: dimension - Dimension unknown: - description: This error occurs when the dimension you requested is unknown. - value: - type: https://docs.api.video/reference/request-invalid-query-parameter - title: A query parameter is invalid. - status: 400 - detail: 'This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser' - name: dimension - Invalid filter: - description: This error occurs when the format of the filter you requested is invalid. - value: - type: https://docs.api.video/reference/request-invalid-query-parameter - title: A query parameter is invalid. - status: 400 - detail: 'This value must be of the following structure(s): videoId:{videoId}' - name: filter - Invalid videoId: - description: This error occurs when the videoId you requested does not refer to an existing video. + name: metric + Invalid query parameter: + description: This error occurs when a query parameter you provided does not exist, isn't correct for this endpoint, or has an invalid value. value: type: https://docs.api.video/reference/request-invalid-query-parameter title: A query parameter is invalid. status: 400 - detail: This value must refer to an existing video - name: filter - '403': - headers: - X-RateLimit-Limit: - schema: - type: integer - description: The request limit per minute. - X-RateLimit-Remaining: - schema: - type: integer - description: The number of available requests left for the current time window. - X-RateLimit-Retry-After: - schema: - type: integer - description: The number of seconds left until the current rate limit window resets. - description: Forbidden - Disabled Analytics - content: - application/json: - schema: - $ref: '#/components/schemas/403-error-schema' - examples: - Analytics is disabled: - value: - type: https://docs.api.video/reference/authorization-disabled-analytics - title: You cannot get analytics from this project. - status: 403 + detail: This field was not expected. + name: from:2024-05-20T09:15:05+02:00 '404': headers: X-RateLimit-Limit: @@ -11834,17 +11744,16 @@ paths: schema: type: integer description: The number of seconds left until the current rate limit window resets. - description: Not Found + description: Unrecognized request URL content: application/json: schema: - $ref: '#/components/schemas/not-found' + $ref: '#/components/schemas/unrecognized-request-url' examples: - Endpoint not found: + Unrecognized request URL: value: - type: - title: - name: + type: 'https://docs.api.video/reference/unrecognized-request-url' + title: Unrecognized request URL. status: 404 '429': headers: @@ -11866,15 +11775,810 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. status: 429 security: - apiKey: [] - deprecated: true - x-client-action: getVideosPlays + x-client-action: getAggregatedMetrics + x-group-parameters: true + x-client-paginated: true + x-doctave: + code-samples: + '/data/buckets/{metric}/{breakdown}': + get: + tags: + - Analytics v2.0 beta + summary: Retrieve metrics in a breakdown of dimensions + description: Retrieve detailed analytics play-rate and number of impressions segmented by dimensions like country or device type. + operationId: GET_metrics-breakdown + parameters: + - name: metric + in: path + description: | + Use this path parameter to select a metric that you want analytics for. + + - `play` is the number of times your content has been played. + - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. + - `start` is the number of times playback was started. + - `end` is the number of times playback has ended with the content watch until the end. + - `impression` is the number of times your content has been loaded and was ready for playback. + required: true + style: simple + explode: false + schema: + type: string + enum: + - play + - play-rate + - start + - end + - impression + - name: breakdown + in: path + description: | + Use this path parameter to define a dimension for segmenting analytics data. You must use `kebab-case` for path parameters. + + These are the available dimensions: + + - `media-id`: Returns analytics based on the unique identifiers of a video or a live stream. + - `media-type`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. + - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. + - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). + - `device-type`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. + - `operating-system`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. + - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. + style: simple + explode: false + required: true + schema: + type: string + enum: + - media-id + - media-type + - continent + - country + - device-type + - operating-system + - browser + - name: from + in: query + description: | + Use this query parameter to define the starting date-time of the period you want analytics for. + + - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. + - The maximum value is 365 days ago, and April 1st 2024. + - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` + style: form + explode: false + schema: + type: string + format: date-time + example: 2024-02-05T00:00:00+01:00 + - name: to + in: query + description: | + Use this query parameter to define the ending date-time of the period you want analytics for. + + - If you do not set a value for `to`, the default assigned value is `now`. + - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. + style: form + explode: false + schema: + type: string + format: date-time + example: 2024-02-06T00:00:00+01:00 + - name: filterBy + in: query + description: | + Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. + + - If you do not set a value for `filterBy`, the API returns the full dataset for your project. + + These are the available breakdown dimensions: + + - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. + - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. + - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. + - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). + - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. + - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. + - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. + style: form + explode: true + schema: + type: string + example: filterBy[continent]=EU&filterBy[country]=FR&filterBy[browser]=Safari&filterBy[browser]=Firefox + responses: + '200': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/analytics-metrics-breakdown-response' + examples: + Number of plays in a country over a specific timeframe: + value: + context: + metric: play + breakdown: country + timeframe: + from: '2024-04-28T07:15:05+00:00' + to: '2024-05-29T11:25:37+00:00' + data: + - metricValue: 7 + dimensionValue: FR + pagination: + currentPage: 1 + currentPageItems: 1 + pageSize: 25 + pagesTotal: 1 + itemsTotal: 1 + links: + - rel: self + uri: "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25" + - rel: first + uri: "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25" + - rel: last + uri: "/data/buckets/play/country?from=2024-04-28T09%3A15%3A05%2B02%3A00¤tPage=1&pageSize=25" + '400': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Bad request error + content: + application/json: + schema: + title: Bad request error + $ref: '#/components/schemas/analytics-plays-400-error' + examples: + Invalid attribute: + description: This error occurs when a parameter you provided does not exist, or isn't correct for this endpoint, has an invalid value. + value: + type: https://docs.api.video/reference/invalid-attribute + title: An attribute is invalid. + status: 400 + detail: This value must be of type string. + name: metric + Invalid query parameter: + description: This error occurs when a query parameter you provided does not exist, isn't correct for this endpoint, or has an invalid value. + value: + type: https://docs.api.video/reference/request-invalid-query-parameter + title: A query parameter is invalid. + status: 400 + detail: This field was not expected. + name: from:2024-05-20T09:15:05+02:00 + '404': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Unrecognized request URL + content: + application/json: + schema: + $ref: '#/components/schemas/unrecognized-request-url' + examples: + Unrecognized request URL: + value: + type: 'https://docs.api.video/reference/unrecognized-request-url' + title: Unrecognized request URL. + status: 404 + '429': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/too-many-requests' + examples: + Too many requests: + value: + type: 'https://docs.api.video/reference/too-many-requests' + title: Too many requests. + status: 429 + security: + - apiKey: [] + x-client-action: getMetricsBreakdown + x-group-parameters: true + x-client-paginated: true + x-doctave: + code-samples: + '/data/timeseries/{metric}': + get: + tags: + - Analytics v2.0 beta + summary: Retrieve metrics over time + description: Retrieve countable metrics like the number of plays or impressions, grouped by the time at which they occurred + operationId: GET_metrics-over-time + parameters: + - name: metric + in: path + description: | + Use this path parameter to select a metric that you want analytics for. + + - `play` is the number of times your content has been played. + - `play-rate` is the ratio that calculates the number of plays your content receives divided by its impressions. + - `start` is the number of times playback was started. + - `end` is the number of times playback has ended with the content watch until the end. + - `impression` is the number of times your content has been loaded and was ready for playback. + required: true + style: simple + explode: false + schema: + type: string + enum: + - play + - play-rate + - start + - end + - impression + - name: from + in: query + description: | + Use this query parameter to define the starting date-time of the period you want analytics for. + + - If you do not set a value for `from`, the default assigned value is 1 day ago, based on the `to` parameter. + - The maximum value is 365 days ago, and April 1st 2024. + - The value you provide should follow the ATOM date-time format: `2024-02-05T00:00:00+01:00` + style: form + explode: false + schema: + type: string + format: date-time + example: from=2024-02-05T00:00:00+01:00 + - name: to + in: query + description: | + Use this query parameter to define the ending date-time of the period you want analytics for. + + - If you do not set a value for `to`, the default assigned value is `now`. + - The value for `to` is a non-inclusive value: the API returns data **before** the date-time that you set. + style: form + explode: false + schema: + type: string + format: date-time + example: to=2024-02-06T00:00:00+01:00 + - name: interval + in: query + description: | + Use this query parameter to define how granularity of the data. Possible values: `hour`, `day`. + + - Default: If no interval specified and the period (different between from and to) ≤ 2 days then hour, otherwise day. + + - If you do not set a value for `interval`, and the period you set using the `from` and `to` parameters is less than or equals to 2 days, then the default assigned value is `hour`. Otherwise the API sets it to `day`. + style: form + explode: false + schema: + type: string + format: date-time + example: to=2024-02-06T00:00:00+01:00 + - name: filterBy + in: query + description: | + Use this parameter to filter the API's response based on different data dimensions. You can serialize filters in your query to receive more detailed breakdowns of your analytics. You must use `camelCase` for query parameters. + + - If you do not set a value for `filterBy`, the API returns the full dataset for your project. + + These are the available breakdown dimensions: + + - `mediaId`: Returns analytics based on the unique identifiers of a video or a live stream. + - `mediaType`: Returns analytics based on the type of content. Possible values: `video` and `live-stream`. + - `continent`: Returns analytics based on the viewers' continent. The list of supported continents names are based on the [GeoNames public database](https://www.geonames.org/countries/). Possible values are: `AS`, `AF`, `NA`, `SA`, `AN`, `EU`, `AZ`. + - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). + - `deviceType`: Returns analytics based on the type of device used by the viewers. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. + - `operatingSystem`: Returns analytics based on the operating system used by the viewers. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. + - `browser`: Returns analytics based on the browser used by the viewers. Response values include `chrome`, `firefox`, `edge`, `opera`. + style: form + explode: true + schema: + type: string + example: filterBy[continent]=EU&filterBy[country]=FR&filterBy[browser]=Safari&filterBy[browser]=Firefox + responses: + '200': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/analytics-metrics-over-time-response' + examples: + Impression time from a certain date: + value: + context: + metric: play + interval: hour + timeframe: + from: '2024-05-28T11:08:39+00:00' + to: '2024-05-29T11:08:39+00:00' + data: + - emittedAt: '2024-05-29T07:00:00+00:00' + metricValue: 2 + - emittedAt: '2024-05-29T08:00:00+00:00' + metricValue: 1 + - emittedAt: '2024-05-29T09:00:00+00:00' + metricValue: 1 + pagination: + currentPage: 1 + currentPageItems: 3 + pageSize: 25 + pagesTotal: 1 + itemsTotal: 3 + links: + - rel: self + uri: "/data/timeseries/play?currentPage=1&pageSize=25" + - rel: first + uri: "/data/timeseries/play?currentPage=1&pageSize=25" + - rel: last + uri: "/data/timeseries/play?currentPage=1&pageSize=25" + '400': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Bad request error + content: + application/json: + schema: + title: Bad request error + $ref: '#/components/schemas/analytics-plays-400-error' + examples: + Invalid attribute: + description: This error occurs when a parameter you provided does not exist, or isn't correct for this endpoint, has an invalid value. + value: + type: https://docs.api.video/reference/invalid-attribute + title: An attribute is invalid. + status: 400 + detail: This value must be of type string. + name: metric + Invalid query parameter: + description: This error occurs when a query parameter you provided does not exist, isn't correct for this endpoint, or has an invalid value. + value: + type: https://docs.api.video/reference/request-invalid-query-parameter + title: A query parameter is invalid. + status: 400 + detail: This field was not expected. + name: from:2024-05-20T09:15:05+02:00 + '404': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Unrecognized request URL + content: + application/json: + schema: + $ref: '#/components/schemas/unrecognized-request-url' + examples: + Unrecognized request URL: + value: + type: 'https://docs.api.video/reference/unrecognized-request-url' + title: Unrecognized request URL. + status: 404 + '429': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/too-many-requests' + examples: + Too many requests: + value: + type: 'https://docs.api.video/reference/too-many-requests' + title: Too many requests. + status: 429 + security: + - apiKey: [] + x-client-action: getMetricsOverTime + x-group-parameters: true + x-client-paginated: true + x-doctave: + code-samples: + '/analytics/videos/plays': + get: + deprecated: true + tags: + - Analytics + summary: Get play events for video + description: | + Retrieve filtered analytics about the number of plays for your videos in a project. + + This endpoint will be deprecated with the release of Analytics v2.0. + operationId: GET_analytics-videos-plays + parameters: + - name: from + in: query + description: | + Use this query parameter to set the start date for the time period that you want analytics for. + - The API returns analytics data including the day you set in `from`. + - The date you set must be **within the last 30 days**. + - The value you provide must follow the `YYYY-MM-DD` format. + required: true + style: form + explode: true + schema: + type: string + format: date + example: 2023-06-01 + - name: to + in: query + description: | + Use this optional query parameter to set the end date for the time period that you want analytics for. + - If you do not specify a `to` date, the API returns analytics data starting from the `from` date up until today, and excluding today. + - The date you set must be **within the last 30 days**. + - The value you provide must follow the `YYYY-MM-DD` format. + required: false + style: form + explode: true + schema: + type: string + format: date + example: 2023-06-10 + - name: dimension + in: query + description: |- + Use this query parameter to define the dimension that you want analytics for. + - `videoId`: Returns analytics based on the public video identifiers. + - `emittedAt`: Returns analytics based on the times of the play events. The API returns data in specific interval groups. When the date period you set in `from` and `to` is less than or equals to 2 days, the response for this dimension is grouped in hourly intervals. Otherwise, it is grouped in daily intervals. + - `country`: Returns analytics based on the viewers' country. The list of supported country names are based on the [GeoNames public database](https://www.geonames.org/countries/). + - `deviceType`: Returns analytics based on the type of device used by the viewers during the play event. Possible response values are: `computer`, `phone`, `tablet`, `tv`, `console`, `wearable`, `unknown`. + - `operatingSystem`: Returns analytics based on the operating system used by the viewers during the play event. Response values include `windows`, `mac osx`, `android`, `ios`, `linux`. + - `browser`: Returns analytics based on the browser used by the viewers during the play event. Response values include `chrome`, `firefox`, `edge`, `opera`. + required: true + style: form + explode: false + schema: + type: string + enum: + - videoId + - emittedAt + - country + - deviceType + - operatingSystem + - browser + example: browser + - name: filter + in: query + description: Use this query parameter to filter your results to a specific + video in a project that you want analytics for. You must use the `videoId:` prefix when specifying a video ID. + required: false + style: form + explode: false + schema: + type: string + example: videoId:vi3q7HxhApxRF1c8F8r6VeaI + - $ref: '#/components/parameters/current-page' + - $ref: '#/components/parameters/page-size' + responses: + '200': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Success + content: + application/json: + schema: + $ref: '#/components/schemas/analytics-plays-response' + examples: + Dimension is videoId: + description: Breakdown video-plays by videoId for a project. + value: + data: + - value: vi3q7HxhApxRF1c8F8r6VeaI + plays: 100 + - value: vi3q7HxhApxRF1c8F8r6VeaF + plays: 10 + - value: vi3q7HxhApxRF1c8F8r6VeaH + plays: 1 + pagination: + currentPage: 1 + currentPageItems: 3 + pageSize: 25 + pagesTotal: 1 + itemsTotal: 3 + links: + - rel: self + uri: "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25" + - rel: first + uri: "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25" + - rel: last + uri: "/analytics/videos/plays?dimension=videoId¤tPage=1&pageSize=25" + Dimension is country: + description: Breakdown video-plays by country for a project, with pagination set. + value: + data: + - value: france + plays: 100 + - value: united states + plays: 10 + - value: spain + plays: 1 + pagination: + currentPage: 1 + currentPageItems: 2 + pageSize: 2 + pagesTotal: 2 + itemsTotal: 3 + links: + - rel: self + uri: "/analytics/videos/plays?dimension=country¤tPage=1&pageSize=2" + - rel: first + uri: "/analytics/videos/plays?dimension=country¤tPage=1&pageSize=2" + - rel: next + uri: "/analytics/videos/plays?dimension=country¤tPage=2&pageSize=1" + - rel: last + uri: "/analytics/videos/plays?dimension=country¤tPage=2&pageSize=1" + Dimension is emittedAt, filtered for a videoId: + description: Breakdown video-plays by the time of play events, for a specific video. + value: + data: + - value: 2023-06-10T10:00:00.000Z + plays: 100 + - value: 2023-06-10T11:00:00.000Z + plays: 10 + - value: 2023-06-10T12:00:00.000Z + plays: 1 + pagination: + currentPage: 1 + currentPageItems: 3 + pageSize: 25 + pagesTotal: 1 + itemsTotal: 3 + links: + - rel: self + uri: "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" + - rel: first + uri: "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" + - rel: last + uri: "/analytics/videos/plays?dimension=videoId&filter=videoId:vi3VooPMbQLWdPF26qfmNVX6¤tPage=1&pageSize=25" + '400': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Bad request error + content: + application/json: + schema: + title: Bad request error + $ref: '#/components/schemas/analytics-plays-400-error' + examples: + Missing parameter: + description: This error occurs when a required query-parameter is missing. + value: + type: https://docs.api.video/reference/invalid-attribute + title: An attribute is invalid. + status: 400 + detail: This value must be of type string. + name: dimension + Invalid parameter: + description: This error occurs when a required query-parameter format is invalid. + value: + type: https://docs.api.video/reference/request-invalid-query-parameter + title: A query parameter is invalid. + status: 400 + detail: 'This value must be of the following structure(s): videoId:{videoId}' + name: filter + Dimension not allowed: + description: This error occurs when the dimension you requested is not allowed for the endpoint. For example, the dimension `videoId` is not allowed for the `/live-streams` endpoint. + value: + type: https://docs.api.video/reference/request-invalid-query-parameter + title: A query parameter is invalid. + status: 400 + detail: 'This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser' + name: dimension + Dimension unknown: + description: This error occurs when the dimension you requested is unknown. + value: + type: https://docs.api.video/reference/request-invalid-query-parameter + title: A query parameter is invalid. + status: 400 + detail: 'This value must be part of the following values: emittedAt,videoId,country,deviceType,operatingSystem,browser' + name: dimension + Invalid filter: + description: This error occurs when the format of the filter you requested is invalid. + value: + type: https://docs.api.video/reference/request-invalid-query-parameter + title: A query parameter is invalid. + status: 400 + detail: 'This value must be of the following structure(s): videoId:{videoId}' + name: filter + Invalid videoId: + description: This error occurs when the videoId you requested does not refer to an existing video. + value: + type: https://docs.api.video/reference/request-invalid-query-parameter + title: A query parameter is invalid. + status: 400 + detail: This value must refer to an existing video + name: filter + '403': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Forbidden - Disabled Analytics + content: + application/json: + schema: + $ref: '#/components/schemas/403-error-schema' + examples: + Analytics is disabled: + value: + type: https://docs.api.video/reference/authorization-disabled-analytics + title: You cannot get analytics from this project. + status: 403 + '404': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/not-found' + examples: + Endpoint not found: + value: + type: + title: + name: + status: 404 + '429': + headers: + X-RateLimit-Limit: + schema: + type: integer + description: The request limit per minute. + X-RateLimit-Remaining: + schema: + type: integer + description: The number of available requests left for the current time window. + X-RateLimit-Retry-After: + schema: + type: integer + description: The number of seconds left until the current rate limit window resets. + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/too-many-requests' + examples: + Too many requests: + value: + type: 'https://docs.api.video/reference/too-many-requests' + title: Too many requests. + status: 429 + security: + - apiKey: [] + x-client-action: getVideosPlays x-group-parameters: true x-client-paginated: true x-doctave: @@ -12087,6 +12791,7 @@ paths: } '/analytics/live-streams/plays': get: + deprecated: true tags: - Analytics summary: Get play events for live stream @@ -12389,14 +13094,13 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. status: 429 security: - apiKey: [] - deprecated: true x-client-action: getLiveStreamsPlays x-group-parameters: true x-client-paginated: true @@ -12698,7 +13402,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -12979,7 +13683,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -13224,7 +13928,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -13462,7 +14166,7 @@ paths: schema: $ref: '#/components/schemas/too-many-requests' examples: - response: + Too many requests: value: type: 'https://docs.api.video/reference/too-many-requests' title: Too many requests. @@ -14944,6 +15648,187 @@ components: name: description: The name of the parameter that caused the error. type: string + analytics-aggregated-metrics-response: + title: Analytics v2.0 response for aggregated metrics + type: object + properties: + context: + type: object + properties: + metric: + description: Returns the metric you selected. + type: string + enum: + - play + - start + - end + - impression + - impression-time + - watch-time + example: impression + aggregation: + description: Returns the aggregation you selected. + type: string + enum: + - count + - rate + - total + - average + - sum + example: count + 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 + example: '2024-05-28T11:15:07+00:00' + to: + description: Returns the starting date-time of the period you want analytics for in ATOM date-time format. + type: string + format: date-time + example: '2024-05-29T11:15:07+00:00' + data: + type: number + format: float + example: '356.2' + required: + - context + - data + analytics-metrics-breakdown-response: + title: Analytics v2.0 response for metrics breakdown by dimension + type: object + properties: + context: + type: object + properties: + metric: + description: Returns the metric you selected. + type: string + enum: + - play + - play-rate + - start + - end + - impression + example: impression + breakdown: + description: Returns the dimension you selected. + type: string + enum: + - media-id + - media-type + - continent + - country + - device-type + - operating-system + - browser + example: country + 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 + example: '2024-05-28T11:15:07+00:00' + to: + description: Returns the starting date-time of the period you want analytics for in ATOM date-time format. + type: string + format: date-time + example: '2024-05-29T11:15:07+00:00' + 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: '#/components/schemas/pagination' + required: + - context + - data + - pagination + analytics-metrics-over-time-response: + title: Analytics v2.0 response for metrics over time + type: object + properties: + context: + type: object + properties: + metric: + description: Returns the metric you selected. + type: string + enum: + - play + - play-rate + - start + - end + - impression + example: impression + interval: + description: Returns the interval you selected. + type: string + enum: + - hour + - day + example: day + 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 + example: '2024-05-28T11:15:07+00:00' + to: + description: Returns the starting date-time of the period you want analytics for in ATOM date-time format. + type: string + format: date-time + example: '2024-05-29T11:15:07+00:00' + data: + description: Returns an array of metrics and the timestamps . + type: array + items: + type: object + properties: + emittedAt: + description: Returns the timestamp of the event that belongs to a specific metric in ATOM date-time format. For example, if you set `play` with an `hour` interval in your request, then `emittedAt` returns the hourly timestamps of every play event within the timeframe you defined. + type: string + metricValue: + description: Returns the data for a specific metric value. + type: number + format: float + pagination: + $ref: '#/components/schemas/pagination' + required: + - context + - data + - pagination + unrecognized-request-url: + title: Unrecognized request URL + type: object + properties: + type: + description: A link to the error documentation. + type: string + title: + description: A description of the error that occurred. + type: string + status: + description: The HTTP status code. + type: integer webhooks-list-response: title: Webhooks type: object