Skip to content

Example Job Execution

API Credentials and Organization ID must have been received from castLabs to execute the example.

Python

This example script vtk_submit_jobs.py can be used to post one or more JSON Job description files to the Video Toolkit API.

Replace values in this example JSON Job description DASH_clear.json:

"region": "aws:eu-west-1",
"organization_id": "1",
"location": "s3://{AWS_ACCESS_KEY}:{AWS_SECRET_KEY}@castlabs-dl/public/Transcodes/OUT/",

Add two Organizational Secrets to your account which enable write access to the target S3 resource:

AWS_ACCESS_KEY
AWS_SECRET_KEY

NOTE: Alternatively provide an IAM role in the job description instead of AWS Access Keys.

Execute script to submit all JSON files in ./jobs/

python vtk_submit_jobs.py -u $USER -p $PW -c https://auth.drmtoday.com -v https://vtk.castlabs.com