Introduction
A GET request to the https://api.bcovlive.io/v1/jobs endpoint of the Live API allows you to get a list of live jobs you have created. Similarly, a GET request to https://api.bcovlive.io/v1/jobs/{job_id}/vods gets a list of VOD jobs for a live job. Full details of these requests can be found in the API Reference. This topic provides an overview and some additional detail. Unless noted, the parameters described below apply to both of these requests.
Pagination
Pagination of results is handled through the start_token and page_size query parameters. The page size indicates the number of results to return on each request, and may be set to any number from 1 to 1000.
Each response will include a next_token field if there are any additional results. Setting the start_token to the next_token value will return the next page of results.
Sorting
The results can be sorted using the sort parameter, which can be set to created_at (default) or modified_at. You can also set the sort direction by setting the sort_dir parameter to asc (default) or desc.
Search filters
You can limit results by adding search filter parameters. All search filters are optional. Multiple filters are treated as AND conditions - that is, all conditions must be met for a vod job to be included in the results.
Multiple values can be specified for a single filter using the following format:
{filter}=[value1,value2]
Filter values specified this way are treated as OR conditions -- a job is returned if it matches any of the values.
A comparison operator may be included before a filter value, separated by a colon:
{filter}={op}:{value}
Operators are: gt (greater than), ge (greater than or equal), lt (less than), le (less than or equal). For example, to search for vod jobs created after Jan 1, 2018:
created_at=gt:1514764800000
The filter type is inferred from the value. If a number or boolean needs to be treated as a string it can be enclosed in single quotes:
{filter}=’1234’
| Filter Name | Type | Description / Values |
|---|---|---|
user_id |
string, array of strings | User ID |
created_at |
integer | Unix time of job creation (in milliseconds) |
modified_at |
integer | Unix time of job's last change of state (in milliseconds) |
static |
boolean | Has static endpoint (for list job requests only) |
state |
string, array of strings | One or more job states (for list job requests only) |
jvod_state |
string, array of strings | One or more VOD job states (for list vod job requests only) |
jvod_type |
string, array of strings | One or more VOD job typess (for list vod job requests only) |
label |
string, array of strings | One or more VOD job labelss (for list vod job requests only) |
sep_state |
string, array of strings | One or more static endpoint states (for list job requests only) |
ssai_state |
string, array of strings | One or more SSAI states (for list job requests only) |
region |
string, array of strings | One or more regions (for list job requests only) |
account_id |
string | Search a particular account, or specify ‘*’ to search all accounts. Default value is account API key belongs to |
{other_job_fields} |
inferred from the field type | Other job fields can be filtered on by specifying their internal name and a value |
Examples
Below are a few sample requests for getting live jobs.
- Get live jobs in a finished state, showing the most recently created first:
https://api.bcovlive.io/v1/jobs?state=finished&sort=created_at&sort_dir=desc- Get SEP live jobs that are currently active
https://api.bcovlive.io/v1/jobs?static=true&sep_state=ready- Get live jobs created on or after 2018-10-01
https://api.bcovlive.io/v1/jobs?created_at=gt:1538428165517