Zencoder Outputs API

Operations for getting output details and progress.

OpenAPI Specification

zencoder-outputs-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 Outputs API
  x-bc-access: public
servers:
- url: https://app.zencoder.com/api/v2
  variables: {}
tags:
- name: Outputs
  description: Operations for getting output details and progress.
paths:
  /outputs/{output_id}:
    get:
      tags:
      - Outputs
      summary: Get Output Details
      description: Get details for a job output. Job details are available for two months after the job is submitted.
      operationId: getOutputDetails
      security: []
      parameters:
      - $ref: '#/components/parameters/ContentType'
      - $ref: '#/components/parameters/ZencoderApiKey'
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PerPage'
      - $ref: '#/components/parameters/OutputId'
      responses:
        '200':
          description: Output properties.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OutputMediaFile'
        '403':
          description: Forbidden
        '422':
          description: Invalid query parameters
        '500':
          description: Server error
      deprecated: false
      x-operation-settings:
        CollectParameters: false
        AllowDynamicQueryParameters: false
        AllowDynamicFormParameters: false
        IsMultiContentStreaming: false
  /outputs/{output_id}/progress:
    get:
      tags:
      - Outputs
      summary: Get Output Progress
      description: 'Get the progress of processing for an output file. The current_event_progress number is the percent complete of the current event – so if the event is Transcoding, and current_event_progress is 99.3421, then the file is almost finished transcoding, but hasn''t started uploading yet.


        The progress number is the overall percentage of completion for the output. The progress number is the percent complete of the current event – so if the event is Transcoding, and progress is 99.3421, then the file is almost finished transcoding, but hasn''t started Uploading yet.


        Valid states include:

        - `waiting`

        - `queued`

        - `assigning`

        - `processing`

        - `finished`

        - `failed`

        - `cancelled`

        - `no input`

        - `skipped`


        Events include:

        - `downloading`

        - `transcoding`

        - `uploading`


        If you''re getting a 404 to an output progress request, make sure that you''re using the output ID, not the job or output ID, and make sure your API key is correct. A 404 means that we didn''t find an output file with the specified ID for the account linked to the provided API key.'
      operationId: getOutputProgress
      security: []
      parameters:
      - $ref: '#/components/parameters/ContentType'
      - $ref: '#/components/parameters/ZencoderApiKey'
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PerPage'
      - $ref: '#/components/parameters/OutputId'
      responses:
        '200':
          description: Output processing progress.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OutputProgressResponse'
        '403':
          description: Forbidden
        '422':
          description: Invalid query parameters
        '500':
          description: Server error
      deprecated: false
      x-operation-settings:
        CollectParameters: false
        AllowDynamicQueryParameters: false
        AllowDynamicFormParameters: false
        IsMultiContentStreaming: false
components:
  schemas:
    OutputMediaFile:
      type: object
      readOnly: true
      description: Object containing properties for an output media file.
      properties:
        audio_bitrate_in_kbps:
          type: integer
          description: Audio bitrate of the output media file
          example: 90
          readOnly: true
        audio_codec:
          type: string
          description: Audio codec of the output media file
          example: aac
          readOnly: true
        audio_sample_rate:
          type: integer
          description: Audio sample rate of the output media file
          example: 44100
          readOnly: true
        channels:
          type: integer
          description: The number of audio channels in the output media file
          example: 2
          readOnly: true
        created_at:
          type: string
          description: ISO 8601 date-time string representing when the output file was created
          example: '2017-04-20T16:08:02Z'
          readOnly: true
        updated_at:
          type: string
          description: ISO 8601 date-time string representing when state of processing on the output file last changed
          example: '2017-04-20T16:08:02Z'
          readOnly: true
        finished_at:
          type: string
          description: ISO 8601 date-time string representing when processing the output file finished
          example: '2017-04-20T16:08:02Z'
          readOnly: true
        duration_in_ms:
          type: integer
          description: Duration in ms of the output media file
          example: 51312
          readOnly: true
        error_class:
          type: string
          description: The type of error thrown if an error occurred in processing the output file
          example: InvalidAudioSettingsError
          readOnly: true
        error_message:
          type: string
          description: The error message thrown if an error occurred in processing the output file
          example: The supplied audio encoding settings were not valid
          readOnly: true
        file_size_bytes:
          type: integer
          description: The file size in bytes of the output file
          example: 922620
          readOnly: true
        fragment_duration_in_ms:
          type: integer
          description: Duration of final fragment for segmented types
          example: 5478
          readOnly: true
        format:
          type: string
          description: The format of the output file
          example: mpeg4
          readOnly: true
        frame_rate:
          type: integer
          description: The frame_rate of the output file
          example: 30
          readOnly: true
        height:
          type: integer
          description: The frame height of the output file in pixels
          example: 360
          readOnly: true
        id:
          type: integer
          description: The id of the output file, an integer in the 64-bit range.
          example: 365495537
          readOnly: true
        label:
          type: string
          description: Label for the output
          example: mp4 high
          readOnly: true
        md5_checksum:
          type: integer
          description: The checksum of the output file
          example: 9c98085f2e10ca0490aa3e2b6746f7dd
          readOnly: true
        privacy:
          type: boolean
          description: Privacy mode
          example: true
          readOnly: true
        rfc_6381_audio_codec:
          type: string
          description: Audio codec for industry compatibility
          example: avc1.42001e
          readOnly: true
        rfc_6381_video_codec:
          type: string
          description: Video codec for industry compatibility
          example: mp4a.40.2
          readOnly: true
        state:
          type: string
          description: 'The current state of the file:

            - pending (not yet submitted to Zencoder)

            - submitting (currently submitting to Zencoder)

            - transcoding (currently transcoding)

            - uploading (currently uploading the output file)

            - finished (Zencoder finished processing the file)

            - failed (Zencoder was unable to process the file)'
        test:
          type: boolean
          description: Test mode
          example: true
          readOnly: true
        video_bitrate_in_kbps:
          type: integer
          description: video bitrate of the output file
          example: 1402
          readOnly: true
        video_codec:
          type: string
          description: video codec of the output file
          example: h264
          readOnly: true
        width:
          type: integer
          description: frame width of the output file in pixels
          example: 640
          readOnly: true
        total_bitrate_in_kbps:
          type: integer
          description: total audio+video bitrate of the output file
          example: 7906
          readOnly: true
        url:
          type: string
          description: URL of the output file
          example: s3://zencodertesting/test.mov
          readOnly: true
    OutputProgressResponse:
      title: Job Input Progress Response
      description: Progress in the processing of a job input file
      type: object
      properties:
        id:
          type: integer
          description: The output id, an integer in the 64-bit range.
          readOnly: true
        state:
          type: string
          description: The state of output processing
          enum:
          - waiting
          - queued
          - assigning
          - processing
          - finished
          - failed
          - cancelle`
          - no input
          - skipped
        progress:
          type: number
          description: Input processing percentage completed
        current_event:
          type: string
          description: The current activity
          enum:
          - downloading
          - transcoding
          - uploading
        current_event_progress:
          type: number
          description: The current activity percentage completed
  parameters:
    Page:
      name: page
      in: query
      description: The page of results to return
      style: form
      explode: true
      schema:
        type: integer
    PerPage:
      name: per_page
      in: query
      description: The number of results to return for each page
      style: form
      explode: true
      schema:
        type: integer
        minimum: 1
        maximum: 50
    OutputId:
      name: output_id
      in: path
      description: A Zencoder job output id
      required: true
      style: simple
      explode: false
      schema:
        type: integer
    ContentType:
      name: Content-Type
      in: header
      description: 'Content-Type: application/json'
      required: true
      style: simple
      explode: false
      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