Developer

Transform provides several API endpoints specifically for developers. Most require you to provide a X-Full-Api-Key header to the API request.

Inflated Composition

When a job is submitted the composition is "inflated" by the pre-processor and executed by the post-processor. You can request the inflated composition using the composition API endpoint. For example use the following command to get the composition for a specific job:

curl -L -H 'X-Api-Key: tcs_YOUR_API_KEY' 'https://api.cloud.telestream.net/transform/v1.0/factories/FACTORY_ID/jobs/JOB_ID/composition'

Log

You can request the stdout and stderr messages from the post-processor using the log API endpoint. For example use the following command to get the log for a specific job:

curl -L -H 'X-Api-Key: tcs_YOUR_API_KEY' -H 'X-Full-Api-Key: SECRET_API_KEY' 'https://api.cloud.telestream.net/transform/v1.0/factories/FACTORY_ID/jobs/JOB_ID/log'

Job Tag

By default the service will automatically determined where to process a job. Use the job_tag property to route the job to a specific cloud provider and region.

For example the following command routes the job to the AWS us-east-1 region:

curl --location --request POST 'https://api.cloud.telestream.net/transform/v1.0/factories/5ec3d24d55dfd6c3d4b230df0f842adf/jobs' \
--header 'X-Api-Key: tcs_YOUR_API_KEY' \
--header 'X-Full-Api-Key: SECRET_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "job_tag": "starfish@aws-us-east-1",
  "template_id" : "TEMPLATE_ID",
  "inputs": {
    "input1": {
      "url": "https://storage.googleapis.com/telestream_media/m2ts/showtime/mp2v_1920x1080p24_in24_8%4048k.mpg"
    }
  }
}'

Engine Version

By default a job will be processed using an engine version associated with the factory. Use the engine_version property to specify a different version or to use a specific container build.

For example the following command uses a container from the development repositrory:

curl --location --request POST 'https://api.cloud.telestream.net/transform/v1.0/factories/FACTORY_ID/jobs' \
--header 'X-Api-Key: tcs_YOUR_API_KEY' \
--header 'X-Full-Api-Key: SECRET_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "engine_version": "[email protected]:4567/cloud/starfish/development:1.0.1631",
  "template_id" : "TEMPLATE_ID",
  "inputs": {
    "input1": {
      "url": "https://storage.googleapis.com/telestream_media/transform-uploads/BigBuckBunny30sec-stereo16b_Unencoded.wav"
    }
  }
}'