Zencoder Inputs API

Operations for getting input details and progress.

OpenAPI Specification

zencoder-inputs-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 Inputs API
  x-bc-access: public
servers:
- url: https://app.zencoder.com/api/v2
  variables: {}
tags:
- name: Inputs
  description: Operations for getting input details and progress.
paths:
  /inputs/{input_id}:
    get:
      tags:
      - Inputs
      summary: Get Input Details
      description: Get job input Details. Job details are available for two months after the job is submitted.
      operationId: getInputDetails
      security: []
      parameters:
      - $ref: '#/components/parameters/ContentType'
      - $ref: '#/components/parameters/ZencoderApiKey'
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PerPage'
      - $ref: '#/components/parameters/InputId'
      responses:
        '200':
          description: Input properties.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InputMediaFile'
        '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
  /inputs/{input_id}/progress:
    get:
      tags:
      - Inputs
      summary: Get Input Progress
      description: 'Get the progress of processing for the input file. The current_event_progress number is the percent complete of the current event – so if the event is Downloading, and current_event_progress is 99.3421, then the file is almost finished downloading, but hasn''t started Inspecting yet.


        The progress number is the overall percentage of completion for the input. The progress number is the percent complete of the current event – so if the event is Downloading, and progress is 99.3421, then the file is almost finished downloading, but hasn''t started Inspecting yet.


        Valid states include:

        - `waiting`

        - `pending`

        - `assigning`

        - `processing`

        - `finished`

        - `failed`

        - `cancelled`


        Events include:

        - `downloading`

        - `inspecting`


        If you''re getting a 404 to an input progress request, make sure that you''re using the input ID, not the job or output ID, and make sure your API key is correct. A 404 means that we didn''t find an input file with the specified ID for the account linked to the provided API key.'
      operationId: getInputProgress
      security: []
      parameters:
      - $ref: '#/components/parameters/ContentType'
      - $ref: '#/components/parameters/ZencoderApiKey'
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/PerPage'
      - $ref: '#/components/parameters/InputId'
      responses:
        '200':
          description: Input processing progress.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InputProgressResponse'
        '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:
  parameters:
    Page:
      name: page
      in: query
      description: The page of results to return
      style: form
      explode: true
      schema:
        type: integer
    InputId:
      name: input_id
      in: path
      description: A Zencoder job input id
      required: true
      style: simple
      explode: false
      schema:
        type: string
    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
    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
  schemas:
    InputProgressResponse:
      title: Job Input Progress Response
      description: Progress in the processing of a job input file
      type: object
      properties:
        id:
          type: integer
          description: The input id, an integer in the 64-bit range.
          readOnly: true
        state:
          type: string
          description: The state of input processing
          enum:
          - waiting
          - pending
          - assigning
          - processing
          - finished
          - failed
          - cancelled
        progress:
          type: number
          description: Input processing percentage completed
        current_event:
          type: string
          description: The current activity
          enum:
          - downloading
          - inspecting
        current_event_progress:
          type: number
          description: The current activity percentage completed
    InputMediaFile:
      type: object
      readOnly: true
      description: Object containing properties for the input media file.
      properties:
        audio_bitrate_in_kbps:
          type: integer
          description: Audio bitrate of the input media file
          example: 90
          readOnly: true
        audio_codec:
          type: string
          description: Audio codec of the input media file
          example: aac
          readOnly: true
        audio_sample_rate:
          type: integer
          description: Audio sample rate of the input media file
          example: 44100
          readOnly: true
        audio_tracks:
          type: integer
          description: The number of audio tracks in the input media file
          example: 2
          readOnly: true
        channels:
          type: integer
          description: The number of audio channels in the input media file
          example: 2
          readOnly: true
        created_at:
          type: string
          description: ISO 8601 date-time string representing when the input 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 input 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 input file finished
          example: '2017-04-20T16:08:02Z'
          readOnly: true
        duration_in_ms:
          type: integer
          description: Duration in ms of the input media file
          example: 51312
          readOnly: true
        error_class:
          type: string
          description: The type of error thrown if an error occurred in processing the input file
          example: InvalidAudioSettingsError
          readOnly: true
        error_message:
          type: string
          description: The error message thrown if an error occurred in processing the input 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 input file
          example: 922620
          readOnly: true
        format:
          type: string
          description: The format of the input file
          example: mpeg4
          readOnly: true
        frame_rate:
          type: integer
          description: The frame_rate of the input file
          example: 30
          readOnly: true
        height:
          type: integer
          description: The frame height of the input file in pixels
          example: 360
          readOnly: true
        id:
          type: integer
          description: The id of the input file, an integer in the 64-bit range.
          example: 365495537
          readOnly: true
        md5_checksum:
          type: integer
          description: The checksum of the input file
          example: 9c98085f2e10ca0490aa3e2b6746f7dd
          readOnly: true
        privacy:
          type: boolean
          description: Privacy mode
          example: true
          readOnly: true
        state:
          type: string
          description: 'The current state of the file:

            - pending (not yet submitted to Zencoder)

            - submitting (currently submitting to Zencoder)

            - 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 input file
          example: 1402
          readOnly: true
        video_codec:
          type: string
          description: video codec of the input file
          example: h264
          readOnly: true
        width:
          type: integer
          description: frame width of the input file in pixels
          example: 640
          readOnly: true
        total_bitrate_in_kbps:
          type: integer
          description: total audio+video bitrate of the input file
          example: 7906
          readOnly: true
        url:
          type: string
          description: URL of the input file
          example: s3://zencodertesting/test.mov
          readOnly: true
x-bc-implicit-head: true
x-bc-implicit-options: true
x-bc-upstream: http://backend_server