Home » API Reference » Jobs » Job Progress

permalink Job Progress

Job Progress is available beginning with V2 of the Zencoder API.

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

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

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


Required

Optional


More Information

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

    {
      "state": "processing",
      "progress": 32.34567345,
      "input": {
        "id": 1234,
        "state": "finished"
      },
      "outputs": [
        {
          "id": 4567,
          "state": "processing",
          "current_event": "Transcoding",
          "current_event_progress": 25.0323,
          "progress": 35.23532
        },
        {
          "id": 4568,
          "state": "processing",
          "current_event": "Uploading",
          "current_event_progress": 82.32,
          "progress": 95.3223
        }
      ]
    }
  
    
      processing
      32.34567345
      <input>
        1234
        finished
      </input>
      
        
          4567
          processing
          Transcoding
          25.0323
          35.23532
        
        
          4568
          processing
          Uploading
          82.32
          95.3223
        
      
    
  

Valid states include: pending, waiting, processing, finished, failed, and cancelled.

Keys and values for inputs and outputs are the same as in Input Progress and Output Progress, but also include the ID.

If you're getting a 404 to a Job Progress request, make sure that you're using the job ID, not the input ID or any of the output IDs, and make sure your API key is correct. A 404 means that we didn't find a job 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",
        "progress": 32.34567345,
        "input": {
          "id": 1234,
          "state": "finished"
        },
        "outputs": [
          {
            "id": 4567,
            "state": "processing",
            "current_event": "Transcoding",
            "current_event_progress": 25.0323,
            "progress": 35.23532
          },
          {
            "id": 4568,
            "state": "processing",
            "current_event": "Uploading",
            "current_event_progress": 82.32,
            "progress": 95.3223
          }
        ]
      }
    )