Home » API Reference » Inputs » Input Progress

permalink Input Progress

GET https://app.zencoder.com/api/v2/inputs/1234/progress.json?api_key=asdf1234

GET https://app.zencoder.com/api/v2/inputs/1234/progress.xml?api_key=asdf1234

GET https://app.zencoder.com/api/v2/inputs/1234/progress.js?api_key=asdf1234&callback=asdf


API Version

Available in API version 2 or greater (for example: https://app.zencoder.com/api/v2/).


Required

Optional


More Information

Api V2 and later

The return will contain one or more of the following keys: state, current_event, current_event_progress and progress.

    {
      "state": "processing",
      "current_event": "Downloading",
      "current_event_progress": "32.34567345",
      "progress": "45.2353255"
    }
  
    
      processing
      Downloading
      32.34567345
      45.2353255
    
  

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.

Api V1 and earlier

The return will contain one or more of the following keys: state, current_event, and progress.

    {
      "state": "processing",
      "current_event": "Downloading",
      "progress": "32.34567345"
    }
  
    
      processing
      Downloading
      32.34567345
    
  

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 and 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.

JSONP Requests

For AJAX and other public requests, Read Only API Keys can access this information using JSONP by requesting the URL with a .js extension. The response will use the progress callback unless one is specified using the callback in the querystring.

    progress(
      {
        "state": "processing",
        "current_event": "Downloading",
        "progress": "32.34567345"
      }
    )