Wowza analytics_popularity API

Operations related to popularity analytics.

OpenAPI Specification

wowza-analytics-popularity-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Wowza Streaming Engine REST advanced_token_authentication analytics_popularity API
  description: Complete REST API for Wowza Streaming Engine. Auto-converted from Swagger 1.2 (http://localhost:8089/swagger.json) to OpenAPI 3.0.3 for public documentation.
  version: 2.0.0
  contact:
    name: Wowza Media Systems
    url: https://www.wowza.com/docs/wowza-streaming-engine-rest-api
  license:
    name: Wowza Media Systems
    url: https://www.wowza.com
servers:
- url: http://localhost:8087
  description: Wowza Streaming Engine Server
security:
- basicAuth: []
tags:
- name: analytics_popularity
  description: Operations related to popularity analytics.
  x-displayName: Popularity
paths:
  /analytics/popularity/live_streams/{id}:
    get:
      summary: Fetch popularity analytics data for a live stream or real-time stream
      description: "(Available from version 1.11) This operation returns the popularity data for a specific live stream or real-time stream. Popularity data provides insight into how many times  your stream is displayed to a possible viewer and how many times it's played. \n\nIf you don't send from and to query parameters, the last hour's worth of data is returned. \n\nUse the include query parameter to specify whether you want to return trend data. See the **trend** field in the response for information about sample intervals.\n\nIf the time range between **from** and **to** query parameters is:\n\n<ul><li>Less than 60 minutes, the cache time between responses is 10 seconds.</li>\n<li>More than 60 minutes, the cache time between responses is 60 seconds.</li>"
      operationId: analyticsLivestreamPopularity
      tags:
      - analytics_popularity
      x-codeSamples:
      - lang: Shell
        source: "// Using cURL\ncurl -H \"Authorization: Bearer ${WV_JWT}\" \\\n  \n  -H \"Content-Type: application/json\" \\\n  -X \"GET\" \\\n  \"${WV_HOST}/api/v2.0/analytics/popularity/live_streams/tvctq36g?from=2023-04-14T10:31:54.486Z&to=2023-07-13T10:31:54.486Z&include=trend\"\n"
      - lang: JavaScript
        source: "// Using Node.js\nconst https = require('https');\nconst crypto = require('crypto');\nvar hostname = 'api.video.wowza.com'\nvar path = '/api/v2.0/analytics/popularity/live_streams/tvctq36g?from=2023-04-14T10:31:54.486Z&to=2023-07-13T10:31:54.486Z&include=trend';\n//For security, never reveal API token in client-side code\nvar wvJWT = 'Bearer [your JWT]';\n\nconst options = {\n  hostname: hostname,\n  path: path,\n  headers: {\n    'Authorization': wvJWT,\n    'Content-Type': 'application/json'\n  }\n};\nhttps.get(options, function(res) {\n  var body = '';\n  res.on('data', function(data){\n    body += data;\n  });\n  res.on('end', function() {\n    console.log(JSON.parse(body));\n  });\n}).on('error', function(e) {\n  console.log(e.message);\n});"
      parameters:
      - name: id
        in: path
        required: true
        description: The unique alphanumeric string that identifies the live stream or real-time stream.
        schema:
          type: string
      - name: from
        in: query
        required: false
        description: "Use this parameter, along with **to**, to return historic viewer data. \n\nThe start of the range of time you want to view. Specify **YYYY-DD-MMT HH:MM:SSZ** where **HH** is a 24-hour clock in UTC. The range queried is rounded to the nearest second. If you set the **from** query parameter without setting the **to** query parameter, the data returned will reflect 30 days starting at the **from** date, or data up to to the current day, whichever is shorter.\n\nExample:\n**2023-01-14T10:31:54.486Z**"
        schema:
          type: string
          format: date-time
      - name: to
        in: query
        required: false
        description: "Use this parameter, along with **from**, to return historic viewer data. \n\n\nThe end of the range of time you want to view. Specify **YYYY-DD-MMT HH:MM:SSZ** where **HH** is a 24-hour clock in UTC. The range queried is rounded to the nearest second. If you set the **to** query parameter without setting the **from** query parameter, the data returned will be from the past 30 days.\n\nExample:\n**2023-02-14T10:31:54.486Z**"
        schema:
          type: string
          format: date-time
      - name: include
        in: query
        required: false
        description: 'Specify the data you want returned in the response. he only valid value for this endpoint is **trend**.


          Valid value is: **trend**.


          Example:

          **trend**'
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics_popularity_live_stream'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '410':
          description: Gone
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error410'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error422'
  /analytics/popularity/vod_streams/{id}:
    get:
      summary: Fetch popularity analytics data for a VOD stream
      description: "(Available from version 1.11) This operation returns the popularity data for a specific VOD stream. Popularity data provides insight into how many times  your video is displayed to a possible viewer and how many times it's played. \n\nIf you don't send from and to query parameters, the last hour's worth of data is returned. See the **trend** field in the response for information about sample intervals.\n\nUse the include query parameter to specify whether you want to return trend data. See the **trend** field in the response for information about sample intervals.\n\nIf the time range between **from** and **to** query parameters is:\n\n<ul><li>Less than 60 minutes, the cache time between responses is 10 seconds.</li>\n<li>More than 60 minutes, the cache time between responses is 60 seconds.</li>"
      operationId: analyticsVodStreamPopularity
      tags:
      - analytics_popularity
      x-codeSamples:
      - lang: Shell
        source: "// Using cURL\ncurl -H \"Authorization: Bearer ${WV_JWT}\" \\\n  \n  -H \"Content-Type: application/json\" \\\n  -X \"GET\" \\\n  \"${WV_HOST}/api/v2.0/analytics/popularity/vod_streams/tvctq36g?from=2023-04-14T10:31:54.486Z&to=2023-07-13T10:31:54.486Z&include=trend\"\n"
      - lang: JavaScript
        source: "// Using Node.js\nconst https = require('https');\nconst crypto = require('crypto');\nvar hostname = 'api.video.wowza.com'\nvar path = '/api/v2.0/analytics/popularity/vod_streams/tvctq36g?from=2023-04-14T10:31:54.486Z&to=2023-07-13T10:31:54.486Z&include=trend';\n//For security, never reveal API token in client-side code\nvar wvJWT = 'Bearer [your JWT]';\n\nconst options = {\n  hostname: hostname,\n  path: path,\n  headers: {\n    'Authorization': wvJWT,\n    'Content-Type': 'application/json'\n  }\n};\nhttps.get(options, function(res) {\n  var body = '';\n  res.on('data', function(data){\n    body += data;\n  });\n  res.on('end', function() {\n    console.log(JSON.parse(body));\n  });\n}).on('error', function(e) {\n  console.log(e.message);\n});"
      parameters:
      - name: id
        in: path
        required: true
        description: The unique alphanumeric string that identifies the VOD stream.
        schema:
          type: string
      - name: from
        in: query
        required: false
        description: "Use this parameter, along with **to**, to return historic viewer data. \n\nThe start of the range of time you want to view. Specify **YYYY-DD-MMT HH:MM:SSZ** where **HH** is a 24-hour clock in UTC. The range queried is rounded to the nearest second. If you set the **from** query parameter without setting the **to** query parameter, the data returned will reflect 30 days starting at the **from** date, or data up to to the current day, whichever is shorter.\n\nExample:\n**2023-01-14T10:31:54.486Z**"
        schema:
          type: string
          format: date-time
      - name: to
        in: query
        required: false
        description: "Use this parameter, along with **from**, to return historic viewer data. \n\n\nThe end of the range of time you want to view. Specify **YYYY-DD-MMT HH:MM:SSZ** where **HH** is a 24-hour clock in UTC. The range queried is rounded to the nearest second. If you set the **to** query parameter without setting the **from** query parameter, the data returned will be from the past 30 days.\n\nExample:\n**2023-02-14T10:31:54.486Z**"
        schema:
          type: string
          format: date-time
      - name: include
        in: query
        required: false
        description: 'Specify the data you want returned in the response. The only valid value for this endpoint is **trend**.


          Valid value is: **trend**.


          Example:

          **trend**'
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/analytics_popularity_vod_stream'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error401'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error403'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error404'
        '410':
          description: Gone
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error410'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error422'
components:
  schemas:
    Error403:
      type: object
      description: ''
      required:
      - meta
      properties:
        meta:
          type: object
          title: meta
          description: ''
          properties:
            status:
              type: integer
              description: ''
              example: ''
              format: int32
            code:
              type: string
              description: ''
              example: ''
            title:
              type: string
              description: ''
              example: ''
            message:
              type: string
              description: ''
              example: ''
            description:
              type: string
              description: ''
              example: ''
            links:
              type: array
              description: ''
              example: ''
              items: {}
      example:
        Example Response 1:
          meta:
            status: 403
            code: ERR-403-RecordUnaccessible
            title: Record Unaccessible Error
            message: The requested resource isn't accessible.
            description: ''
            links: []
    Error401:
      type: object
      description: ''
      required:
      - meta
      properties:
        meta:
          type: object
          title: meta
          description: ''
          properties:
            status:
              type: integer
              description: ''
              example: ''
              format: int32
            code:
              type: string
              description: ''
              example: ''
            title:
              type: string
              description: ''
              example: ''
            message:
              type: string
              description: ''
              example: ''
            description:
              type: string
              description: ''
              example: ''
            links:
              type: array
              description: ''
              example: ''
              items: {}
      example:
        Example Response 1:
          meta:
            status: 401
            code: ERR-401-NoApiKey
            title: No API Key Error
            message: No API key sent in header.
            description: ''
            links: []
        Example Response 2:
          meta:
            status: 401
            code: ERR-401-NoAccessKey
            title: No Access Key Error
            message: No access key sent in header.
            description: ''
            links: []
        Example Response 3:
          meta:
            status: 401
            code: ERR-401-InvalidApiKey
            title: Invalid Api Key Error
            message: Invalid API key.
            description: ''
            links: []
        Example Response 4:
          meta:
            status: 401
            code: ERR-401-InvalidAccessKey
            title: Invalid Access Key Error
            message: Invalid access key.
            description: ''
            links: []
        Example Response 5:
          meta:
            status: 401
            code: ERR-401-BadAccountStatus
            title: Bad Account Status Error
            message: Your account's status doesn't allow this action.
            description: ''
            links: []
        Example Response 6:
          meta:
            status: 401
            code: ERR-401-FeatureNotEnabled
            title: Feature Not Enabled Error
            message: This feature isn't enabled.
            description: ''
            links: []
        Example Response 7:
          meta:
            status: 401
            code: ERR-401-TrialExceeded
            title: Bad Billing Status Error
            message: Your billing status needs attention. You can't start or add live streams until your billing status is updated.
            description: ''
            links: []
        Example Response 8:
          meta:
            status: 401
            code: ERR-401-ExpiredToken
            title: JWT is expired
            message: Token has exired.
            description: ''
            links: []
        Example Response 9:
          meta:
            status: 401
            code: ERR-401-InvalidToken
            title: JWT is invalid
            message: Token is invalid.
            description: ''
            links: []
    analytics_popularity_vod_stream:
      type: object
      description: ''
      properties:
        vod_stream:
          type: object
          title: vod_stream
          description: ''
          properties:
            id:
              type: string
              description: The unique alphanumeric string that identifies the VOD stream.
              format: int32
            plays:
              type: integer
              description: The total number of plays for a VOD stream. A play is registered when the stream begins to play.
              example: ''
              format: int32
            displays:
              type: integer
              description: The total number of displays for a VOD stream. A display is registered when the player is completely loaded and ready to play the VOD stream.
              example: ''
              format: int32
            trend:
              type: object
              title: Array of popularity trends
              description: "An array of popularity trend data. The granularity of sampled data changes based on the from and to query values you use:\n\n1. Requests made for data _within_ the most recent 3 days returns sample intervals by the hour. You can return sample intervals by the minute by specifying a specific hour range.\n\n2. Requests made for data _beyond_ the most recent 3 days can only return sample intervals by the hour or day. The minute data is not retained beyond the 3rd day. \n\n\n <blockquote>Note: Data from the most recent hour data might not be included in the result of a time range that extends beyond the most recent 3 days. </blockquote>\n\n\n\n<strong>Default</strong>: Last hour"
              properties:
                plays:
                  type: integer
                  description: The total number of plays for a VOD stream at the time the trend data was sampled. A play is registered when the stream begins to play.
                  example: ''
                  format: int32
                displays:
                  type: integer
                  description: 'The total number of displays for a VOD stream at the time the trend data was sampled. A display is registered when the player is completely loaded and ready to play the VOD stream. '
                  example: ''
                  format: int32
                sampled_at:
                  type: string
                  description: The date and time the trend data was sampled.
                  format: date-time
            limits:
              type: object
              description: The time frame represented in the response.
              properties:
                from:
                  type: string
                  description: The start of the range of time represented in the response.
                  example: ''
                  format: date-time
                to:
                  type: string
                  description: The end of the range of time represented in the response.
                  example: ''
                  format: date-time
      example:
        vod_stream:
          id: tvctq36g
          plays: 2
          displays: 2
          trend:
          - plays: 1
            displays: 1
            sampled_at: '2024-03-14T11:31:54.000Z'
          - plays: 1
            displays: 1
            sampled_at: '2024-03-14T12:31:54.000Z'
        limits:
          from: '2024-03-14T10:31:54.000Z'
          to: '2024-03-14T10:31:54.000Z'
    Error422:
      type: object
      description: ''
      required:
      - meta
      properties:
        meta:
          type: object
          title: meta
          description: ''
          properties:
            status:
              type: integer
              description: ''
              example: ''
              format: int32
            code:
              type: string
              description: ''
              example: ''
            title:
              type: string
              description: ''
              example: ''
            message:
              type: string
              description: ''
              example: ''
            description:
              type: string
              description: ''
              example: ''
            links:
              type: array
              description: ''
              example: ''
              items: {}
      example:
        Example Response 1:
          meta:
            status: 422
            code: ERR-422-RecordInvalid
            title: Record Invalid Error
            message: The request couldn't be processed. ... can't be blank
            description: ''
            links: []
        Example Response 2:
          meta:
            status: 422
            code: ERR-422-RecordInvalid
            title: Record Invalid Error
            message: The request couldn't be processed. Provider wowza_video is not allowed
            description: ''
            links: []
        Example Response 3:
          meta:
            status: 422
            code: ERR-422-InvalidStateChange
            title: Invalid State Change Error
            message: The request couldn't be processed. There must be at least one WebRTC output for this transcoder.
            description: ''
            links: []
        Example Response 4:
          meta:
            status: 422
            code: ERR-422-RecordInvalid
            title: Record Invalid Error
            message: API cannot remove the primary Output Stream Target with the ID of <output id> from the Live Stream <livestream id><livestream name>.
            description: ''
            links: []
        Example Response 5:
          meta:
            status: 422
            code: ERR-422-InvalidStateChange
            title: Invalid State Change Error
            message: The request couldn't be processed. The broadcast location can't be updated when using autostart.
            description: ''
            links: []
    Error410:
      type: object
      description: ''
      required:
      - meta
      properties:
        meta:
          type: object
          title: meta
          description: ''
          properties:
            status:
              type: integer
              description: ''
              example: ''
              format: int32
            code:
              type: string
              description: ''
              example: ''
            title:
              type: string
              description: ''
              example: ''
            message:
              type: string
              description: ''
              example: ''
            description:
              type: string
              description: ''
              example: ''
            links:
              type: array
              description: ''
              example: ''
              items: {}
      example:
        Example Response 1:
          meta:
            status: 410
            code: ERR-410-RecordDeleted
            title: Record Deleted Error
            message: The requested resource has been deleted.
            description: ''
            links: []
    analytics_popularity_live_stream:
      type: object
      description: ''
      properties:
        live_stream:
          type: object
          title: live_stream
          description: ''
          properties:
            id:
              type: string
              description: The unique alphanumeric string that identifies the live stream or real-time stream.
              format: int32
            plays:
              type: integer
              description: The total number of plays for a live stream or real-time stream. A play is registered when the stream begins to play.
              example: ''
              format: int32
            displays:
              type: integer
              description: The total number of displays for a live stream or real-time stream. A display is registered when the player is completely loaded and ready to play the stream.
              example: ''
              format: int32
            trend:
              type: object
              title: Array of popularity trends
              description: "An array of popularity trend data. The granularity of sampled data changes based on the from and to query values you use:\n\n1. Requests made for data _within_ the most recent 3 days returns sample intervals by the hour. You can return sample intervals by the minute by specifying a specific hour range.\n\n2. Requests made for data _beyond_ the most recent 3 days can only return sample intervals by the hour or day. The minute data is not retained beyond the 3rd day. \n\n\n <blockquote>Note: Data from the most recent hour data might not be included in the result of a time range that extends beyond the most recent 3 days. </blockquote>\n\n\n<strong>Default</strong>: Last hour"
              properties:
                plays:
                  type: integer
                  description: The total number of plays for a stream at the time the trend data was sampled. A play is registered when the stream begins to play.
                  example: ''
                  format: int32
                displays:
                  type: integer
                  description: The total number of displays for a stream at the time the trend data was sampled. A display is registered when the player is completely loaded and ready to play the stream.
                  example: ''
                  format: int32
                sampled_at:
                  type: string
                  description: The date and time the trend data was sampled.
                  format: date-time
            limits:
              type: object
              description: The time frame represented in the response.
              properties:
                from:
                  type: string
                  description: The start of the range of time represented in the response.
                  example: ''
                  format: date-time
                to:
                  type: string
                  description: The end of the range of time represented in the response.
                  example: ''
                  format: date-time
      example:
        live_stream:
          id: tvctq36g
          plays: 2
          displays: 2
          trend:
          - plays: 1
            displays: 1
            sampled_at: '2024-03-14T11:31:54.000Z'
          - plays: 1
            displays: 1
            sampled_at: '2024-03-14T12:31:54.000Z'
        limits:
          from: '2024-03-14T10:31:54.000Z'
          to: '2024-04-13T10:31:54.000Z'
    Error404:
      type: object
      description: ''
      required:
      - meta
      properties:
        meta:
          type: object
          title: meta
          description: ''
          properties:
            status:
              type: integer
              description: ''
              example: ''
              format: int32
            code:
              type: string
              description: ''
              example: ''
            title:
              type: string
              description: ''
              example: ''
            message:
              type: string
              description: ''
              example: ''
            description:
              type: string
              description: ''
              example: ''
            links:
              type: array
              description: ''
              example: ''
              items: {}
      example:
        Example Response 1:
          meta:
            status: 404
            code: ERR-404-RecordNotFound
            title: Record Not Found Error
            message: The requested resource couldn't be found.
            description: ''
            links: []
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Authentication using Wowza Streaming Engine admin credentials
    digestAuth:
      type: http
      scheme: digest
      description: HTTP Digest Authentication