Skip to content

GET /jobs/[ID]

Description

Get information about jobs. Supports fetching all jobs or a specific job by ID.

Authentication

  • Required: Yes
  • Method: Bearer token

Request Headers

  • Authorization: Bearer [AUTH_TOKEN]
  • Accept:
    • application/json (for JSON responses)
    • application/xml (for XML responses)

Query Parameters

Common Parameters (for both GET /jobs/ and GET /jobs/ID)

  • format: string (Optional)
    Values: json, xml
    Overrides the Accept header if provided.
  • human: boolean (Optional)
    Values: true, false
    Causes the response to be in a structured, more human-readable form.
  • show_null: boolean (Optional)
    Values: true, false
    If set to "true", the response will contain keys that are not set to a value.
  • expand_all: boolean (Optional)
    Values: true, false
    Recursively look up referenced objects and embed the respective JSON as nested objects directly into the response.
  • expand: string (Optional)
    Comma separated referenced objects (e.g. codec, user). Looks up objects referenced by ids and embed the respective JSON as nested objects directly into the response.
  • bin_data: boolean (Optional)
    Values: true, false
    If set to true, the response will include also binary data (like the input file thumbnail) as data-uri. Default value: false.

Parameters for Fetching Multiple Jobs (GET /jobs/)

  • start: int (Optional)
    Offset for paging. Default value: 0.
  • limit: int (Optional)
    Number of preset items per page. Default value: 1000 (max: 5000).
  • sort: string (Optional)
    Values: Any valid key name
    Sorts the output along the given key name. For example, use created_at to sort the results by the creation date.
  • direction: string (Optional)
    Values: 1, -1
    Sort records in ascending ("1") or descending ("-1") order. Default value: "1".
  • user_data: string (Optional)
    Filter result to return only jobs matching the given user_data.
  • inprogress: boolean (Optional)
    Values: true, false
    If true, filters the result to contain only the jobs that are currently in progress or have completed within the past 15 minutes.
  • status: string (Optional)
    Values: SUCCESS, QUEUED, FAILURE
    Filter result to return only jobs matching the given status.
  • autograph: boolean (Optional)
    Values: true, false
    If set, filters the result to include only jobs that have the autograph option enabled ("true") or that have it disabled ("false").
  • pipeline.id: string (Optional)
    Filters result to include only Jobs matching the given pipeline id.
  • input.file.name: string (Optional)
    Filters the result to contain only Jobs with an input file name matching the given value. This filter performs a partial and case-insensitive match, so if the input file name contains the provided string it is a match.
  • from_date: int (Optional) Format: Epoch timestamp. Filters the result to contain only jobs created after the given timestamp.
  • to_date: int (Optional) Format: Epoch timestamp. Filters the result to contain only jobs created before the given timestamp.

Example Request for Listing Multiple Jobs

bash
curl -H "Authorization: Bearer AUTH_TOKEN" "https://api.xvid.com/v1/jobs/?human=true&show_null=true&sort=created_at&start=200&limit=2"

Example Response for Listing Multiple Jobs

Success (200 OK)

json
{
  "jobs": [
    {
      "pipeline": {
        "id": "547f3eede4b025bcbff38657",
        "href": "https://api.xvid.com/v1/pipelines/547f3eede4b025bcbff38657"
      },
      "application": {
        "id": "54e89692e4b069d88de25f8f",
        "href": "https://api.xvid.com/v1/applications/54e89692e4b069d88de25f8f"
      },
      "user_data": null,
      "input": {
        "input_name": "http://s3-eu-west-1.amazonaws.com/test-videos/ED_HD.avi",
        "force_container": null,
        "force_aspect_ratio": null,
        "force_framerate": null,
        "force_interlaced": null,
        "file": {
          "id": "58124aafe4b097397e2370e8",
          "name": "ED_HD.avi",
          "href": "https://api.xvid.com/v1/files/58124aafe4b097397e2370e8"
        }
      },
      "autograph": null,
      "output_prefix": "58124aafe4b097397e2370e7/",
      "playlists": null,
      "outputs": [
        {
          "preset": {
            "id": "52a6bbdfa2ca79055aaa787a",
            "href": "https://api.xvid.com/v1/presets/52a6bbdfa2ca79055aaa787a"
          },
          "file": {
            "id": "58124aafbd0740a7448cf8c2",
            "href": "https://api.xvid.com/v1/files/58124aafbd0740a7448cf8c2"
          },
          "output_name": "ED_HD",
          "percentage_completed": 100,
          "thumbnail_zip": {
            "file": {
              "id": "58124aafbd0740a7448cf8c0",
              "href": "https://api.xvid.com/v1/files/58124aafbd0740a7448cf8c0"
            }
          },
          "thumbnails": [
            {
              "thumbnail_names": "thumb_{resolution}",
              "thumbnail_preset": "thumbnails_small",
              "file": {
                "id": "58124aafbd0740a7448cf8c1",
                "href": "https://api.xvid.com/v1/files/58124aafbd0740a7448cf8c1"
              }
            }
          ],
          "logos": null,
          "settings": {
            "max_duration": null,
            "video": {
              "rotate": null,
              "height": "100%",
              "width": "100%",
              "framerate": null,
              "bitrate": "90%",
              "aspect_ratio": null
            },
            "audio": null
          }
        }
      ],
      "status": "SUCCESS",
      "percentage_completed": 100,
      "error_msg": null,
      "error_code": null,
      "finished_at": 1477594070657,
      "version": 1,
      "user": {
        "id": "547f3eede4b025bcbff38655",
        "href": "https://api.xvid.com/v1/users/547f3eede4b025bcbff38655"
      },
      "created_at": 1477593775669,
      "updated_at": 1477593774917,
      "title": null,
      "id": "58124aafe4b097397e2370e7",
      "href": "https://api.xvid.com/v1/jobs/58124aafe4b097397e2370e7"
    },
    {
      "pipeline": {
        "id": "547f3eede4b025bcbff38657",
        "href": "https://api.xvid.com/v1/pipelines/547f3eede4b025bcbff38657"
      },
      "application": {
        "id": "54e89692e4b069d88de25f8f",
        "href": "https://api.xvid.com/v1/applications/54e89692e4b069d88de25f8f"
      },
      "user_data": null,
      "input": {
        "input_name": "http://s3-eu-west-1.amazonaws.com/test-videos/ED_HD.avi",
        "force_container": null,
        "force_aspect_ratio": null,
        "force_framerate": null,
        "force_interlaced": null,
        "file": {
          "id": "58124bf9e4b097397e237328",
          "name": "ED_HD.avi",
          "href": "https://api.xvid.com/v1/files/58124bf9e4b097397e237328"
        }
      },
      "autograph": null,
      "output_prefix": "58124bf9e4b097397e237325/",
      "playlists": null,
      "outputs": [
        {
          "preset": {
            "id": "52a6bbdfa2ca79055aaa787a",
            "href": "https://api.xvid.com/v1/presets/52a6bbdfa2ca79055aaa787a"
          },
          "file": {
            "id": "58124bf9bd0740a7448cf8ec",
            "href": "https://api.xvid.com/v1/files/58124bf9bd0740a7448cf8ec"
          },
          "output_name": "ED_HD",
          "percentage_completed": 100,
          "thumbnail_zip": {
            "file": {
              "id": "58124bf9bd0740a7448cf8ea",
              "href": "https://api.xvid.com/v1/files/58124bf9bd0740a7448cf8ea"
            }
          },
          "thumbnails": [
            {
              "thumbnail_names": "thumb_{resolution}",
              "thumbnail_preset": "thumbnails_small",
              "file": {
                "id": "58124bf9bd0740a7448cf8eb",
                "href": "https://api.xvid.com/v1/files/58124bf9bd0740a7448cf8eb"
              }
            }
          ],
          "logos": null,
          "settings": {
            "max_duration": null,
            "video": {
              "rotate": null,
              "height": "100%",
              "width": "100%",
              "framerate": null,
              "bitrate": "90%",
              "aspect_ratio": null
            },
            "audio": null
          }
        }
      ],
      "status": "SUCCESS",
      "percentage_completed": 100,
      "error_msg": null,
      "error_code": null,
      "finished_at": 1477594399844,
      "version": 1,
      "user": {
        "id": "547f3eede4b025bcbff38655",
        "href": "https://api.xvid.com/v1/users/547f3eede4b025bcbff38655"
      },
      "created_at": 1477594105190,
      "updated_at": 1477594104195,
      "title": null,
      "id": "58124bf9e4b097397e237325",
      "href": "https://api.xvid.com/v1/jobs/58124bf9e4b097397e237325"
    }
  ],
  "total": 1054,
  "start": 200,
  "limit": 2,
  "first": {
    "href": "https://api.xvid.com/v1/jobs/?start=0&limit=2&show_null=true&human=true&sort=created_at"
  },
  "last": {
    "href": "https://api.xvid.com/v1/jobs/?start=1052&limit=2&show_null=true&human=true&sort=created_at"
  },
  "next": {
    "href": "https://api.xvid.com/v1/jobs/?start=202&limit=2&show_null=true&human=true&sort=created_at"
  },
  "prev": {
    "href": "https://api.xvid.com/v1/jobs/?start=198&limit=2&show_null=true&human=true&sort=created_at"
  }
}

Example Request for Fetching a Specific Job

bash
curl -H "Authorization: Bearer AUTH_TOKEN" "https://api.xvid.com/v1/jobs/5d2f7c35e4b004f9cd197877?human=true&show_null=true"

Example Response for Fetching a Specific Job

Success (200 OK)

json
{
  "job": {
    "pipeline": {
      "id": "547f3eede4b025bcbff38657",
      "href": "https://api.xvid.com/v1/pipelines/547f3eede4b025bcbff38657"
    },
    "application": {
      "id": "5ca50098e4b0dac9133b27fd",
      "href": "https://api.xvid.com/v1/applications/5ca50098e4b0dac9133b27fd"
    },
    "user_data": null,
    "unique_custom_key": null,
    "input": {
      "input_name": "https://s3.amazonaws.com/547f3eede4b025bcbff38657/uploads/fm2AFejzX6Ht4z8WZXxcuCw3Hnxt6SCL/trailer_1080.mp4",
      "force_container": null,
      "force_aspect_ratio": null,
      "force_framerate": null,
      "force_interlaced": null,
      "file": {
        "id": "5d2f7c35e4b004f9cd197878",
        "name": "trailer_1080.mp4",
        "href": "https://api.xvid.com/v1/files/5d2f7c35e4b004f9cd197878"
      }
    },
    "autograph": null,
    "output_prefix": "5d2f7c35e4b004f9cd197877/",
    "playlists": null,
    "outputs": [
      {
        "preset": {
          "id": "5d2f4cc6e3ba95458cb54f96",
          "href": "https://api.xvid.com/v1/presets/5d2f4cc6e3ba95458cb54f96"
        },
        "file": {
          "id": "5d2f7c35e741ffdc387b4903",
          "href": "https://api.xvid.com/v1/files/5d2f7c35e741ffdc387b4903"
        },
        "output_name": "mobile11",
        "percentage_completed": 10,
        "thumbnail_zip": null,
        "thumbnails": null,
        "logos": [
          {
            "logo_image": "https://xmc-prd-s3.s3.amazonaws.com/547f3eede4b025bcbff38657/uploads/7EtdxqzVCIHFp3zL_rbG2I2XyxubQd_a/logo_stroke.svg",
            "logo_preset": "Logo15"
          }
        ],
        "settings": null
      }
    ],
    "status": "FAILURE",
    "percentage_completed": 10,
    "error_msg": "Failed to transcode the file",
    "error_code": "0x005015",
    "finished_at": 1563393092314,
    "version": 1,
    "user": {
      "id": "547f3eede4b025bcbff38655",
      "href": "https://api.xvid.com/v1/users/547f3eede4b025bcbff38655"
    },
    "created_at": 1563393077665,
    "updated_at": 1563393077465,
    "id": "5d2f7c35e4b004f9cd197877",
    "href": "https://api.xvid.com/v1/jobs/5d2f7c35e4b004f9cd197877"
  }
}

Error Responses

400 Bad Request

json
{
  "error": {
    "error_code": "0050001",
    "error_message": "Invalid Input"
  }
}

403 Forbidden

json
{
  "error": {
    "error_code": "0x0000003",
    "error_message": "Invalid access token"
  }
}

404 Not Found

json
{
  "error": {
    "error_code": "0x0050005",
    "error_message": "Job does not exist"
  }
}

500 Internal Server Error

json
{
  "error": {
    "error_code": "0x0000001",
    "error_message": "Internal Error"
  }
}