Zencoder Reports API

Operations for getting reports.

OpenAPI Specification

zencoder-reports-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: 'API for Zencoder. Zencoder offers a fast and reliable transcoding service for video and audio files, as well as live streams. It can produce outputs for the web and a wide variety of devices, and can easily be integrated with your CMS and other applications.


    **Base URL: https://app.zencoder.com/api/v2**'
  version: 2.0.0
  title: Zencoder Accounts Reports API
  x-bc-access: public
servers:
- url: https://app.zencoder.com/api/v2
  variables: {}
tags:
- name: Reports
  description: Operations for getting reports.
paths:
  /reports/vod:
    get:
      tags:
      - Reports
      summary: Get Usage Report
      description: '''This report returns a breakdown of video on demand minute usage by day and grouping. It will contain two top-level keys: total and statistics. total will contain the sum of all statistics returned in the report. statistics will contain an entry for each day and grouping. If you do not use the report grouping feature of the API the report will contain only one entry per day. These statistics are collected about once per hour, but there is only one record per day (per grouping). By default this report excludes the current day from the response because it is only partially complete. It is important to note that our service operates in the UTC time zone (including billing periods). All dates and times reported will be in UTC.'''
      operationId: getUsageReport
      security: []
      parameters:
      - $ref: '#/components/parameters/ContentType'
      - $ref: '#/components/parameters/ZencoderApiKey'
      - $ref: '#/components/parameters/From'
      - $ref: '#/components/parameters/To'
      - $ref: '#/components/parameters/Grouping'
      responses:
        '200':
          description: Get account details response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUsageReportResponse'
        '403':
          description: Forbidden
        '500':
          description: Server error
      deprecated: false
      x-operation-settings:
        CollectParameters: false
        AllowDynamicQueryParameters: false
        AllowDynamicFormParameters: false
        IsMultiContentStreaming: false
  /reports/minutes:
    get:
      tags:
      - Reports
      summary: Get Minutes Used
      description: '''In API version 2 /vod and /minutes return the same data, so this endpoint is identical to `https://app.zencoder.com/api/v2/reports/vod`.'''
      operationId: getMinutesUsed
      security: []
      parameters:
      - $ref: '#/components/parameters/ContentType'
      - $ref: '#/components/parameters/ZencoderApiKey'
      - $ref: '#/components/parameters/From'
      - $ref: '#/components/parameters/To'
      - $ref: '#/components/parameters/Grouping'
      responses:
        '200':
          description: Get minutes used response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetUsageReportResponse'
        '403':
          description: Forbidden
        '500':
          description: Server error
      deprecated: false
      x-operation-settings:
        CollectParameters: false
        AllowDynamicQueryParameters: false
        AllowDynamicFormParameters: false
        IsMultiContentStreaming: false
components:
  schemas:
    GetUsageReportResponse:
      title: Get Usage Report Response
      type: object
      description: Account usage report response
      properties:
        total:
          type: object
          description: Summary object
          properties:
            encoded_minutes:
              type: integer
              description: The total encoding minutes used
              example: 2357
            billable_minutes:
              type: integer
              description: The encoding minutes that were billable
              example: 1896
        statistics:
          type: object
          description: Reports by grouping
          properties:
            grouping:
              type: string
              description: The grouping for these jobs. `null` is for all ungrouped jobs
            collected_on:
              type: string
              description: Date of the report in `YYYY-MM=DD` format
            encoded_minutes:
              type: integer
              description: The total encoding minutes used for this group
              example: 2357
            billable_minutes:
              type: integer
              description: The encoding minutes that were billable for this group
              example: 1896
      example:
        total:
          encoded_minutes: 6
          billable_minutes: 8
        statistics:
        - grouping: myGroup
          collected_on: '2017-03-10'
          encoded_minutes: 4
          billable_minutes: 5
        - grouping: null
          collected_on: '2017-03-10'
          encoded_minutes: 2
          billable_minutes: 3
  parameters:
    To:
      name: to
      in: query
      description: 'End date in the format YYYY-MM-DD (default: today)'
      style: form
      explode: true
      schema:
        type: string
    Grouping:
      name: grouping
      in: query
      description: A grouping name set in the [Create Job](#operation/createJob) operation
      style: form
      explode: true
      schema:
        type: string
    ContentType:
      name: Content-Type
      in: header
      description: 'Content-Type: application/json'
      required: true
      style: simple
      explode: false
      schema:
        type: string
    From:
      name: from
      in: query
      description: 'Start date in the format YYYY-MM-DD (default: 30 days ago)'
      style: form
      explode: true
      schema:
        type: string
    ZencoderApiKey:
      name: Zencoder-Api-Key
      in: header
      description: Your API key
      required: true
      schema:
        type: string
x-bc-implicit-head: true
x-bc-implicit-options: true
x-bc-upstream: http://backend_server