Skip to content

Jobs

A Job is an instruction set that can be submitted to Video Toolkit. Usually such jobs consist of downloading files for processing, processing and uploading of the results. Each Job holds a collection of tasks which are one or more tool definitions.

Job definition

The structure of a job is simply a list of tasks:

{
    "tasks": [{
        "tool": "<tool1>",
        "parameters": [ ... ]
    },
    {
        "tool": "<tool2>",
        "parameters": [ ... ]
    },
    {
        ...
    }]
}

AWS Region selection for jobs

Define the AWS region the job shall be started in (usually a resource pool was created upfront for your organization_id and targeted AWS regions)

{
    "region": "aws:eu-central-1",
    "tags": [
        "Tag ID",
        "Tag ID 2",
        ...
    ],
    "tasks": [{
        "tool": "<tool1>",
        "parameters": [ ... ]
    }]
}

Organizations

If a user is part of multiple organizations simultaneously it is required to specify the organization_id or organization name to assign the job to a specific organization:

{
    "organization_id": organization id
        --- alternatively
    "organization": organization name
    "tasks": [
      ...
    ]
}

Naming/Tagging Jobs

Jobs don't have names or any other human-readable identifier by default. That can make it very difficult to keep track of jobs especially if you try to get oversight by using the UI. Jobs can have tags to help with that. We suggest to use only a few tags per job and made good experience with two tags: One for the category (e.g. 2017-03-Encodings) and one for the asset ID (e.g. Metropolis_1927) as it is referenced in your media asset management system.

{
    "tasks": [{
        "tool": "<tool1>",
        "parameters": [ ... ]
    },
    {
        ...
    }],
    "tags": [
      "2017-03-Encodings",
      "Metropolis_1927"
    ]
}

Job Bundles (Purchase Orders, Bundles)

Jobs can be bundled to so called Job Bundles for better tagging and grouping of multiple jobs. Adding a job to a job bundle by adding the bundle id to the job definition:

{
    "job_bundle_id": job_bundle_id
        --- alternatively
    "job_bundle": job_bundle_name
    "tasks": [{
      ...
    }]
}

Job Bundle Creation

Note: Users creating Job Bundles must have the 'CONFIG' role.


Create a Job Bundle by posting the following JSON job description to $APP_URL/job_bundle/ for example:

Content of jb.json:

{
    "name" : bundle_name,
    "organization_name": your_organization_name
}

cURL command line:

curl -v --data @jb.json -H "Authorization: Ticket $CAS_TICKET" -H content-type:application/json $APP_URL/job_bundle/

Job Bundle Listing

Bundles of jobs can be listed, for example with cURL:

curl -v "Authorization: Ticket $CAS_TICKET" -H content-type:application/json $APP_URL/job_bundle/

Search for names of bundles when listing:

curl -v "Authorization: Ticket $CAS_TICKET" -H content-type:application/json $APP_URL/job_bundle/?search={bundle_name}

Search by name:

curl -v "Authorization: Ticket $CAS_TICKET" -H content-type:application/json $APP_URL/job_bundle/?name={bundle_name}