Querying the Outputs of a Completed Hosted Workflow Job

When the status from the job query indicates a completed job, ie: you receive a response of:

{
    "status": "completed",
    "state": "succeeded",
    "progress": 100
}

Additional job details may be retrieved in order to obtain more information about the outcome of the task.

To retrieve details about a specific job, the job identifier along with the workflow identifier are used in the following GET query:

https://api.cloud.telestream.net/vantage-cloud-port/v2.0/workflows/c29dde60e746f2bcf48876b311829da5/workflow-jobs/82971554f9dde5e0d91878124c08c9db

1078

The job details provide information about the job and any outputs which were created:

{

    "id": "82971554f9dde5e0d91878124c08c9db",
    "name": "Test API",
    "inputs": 
    {
        "sources": 
        {
            "Original": "https://johnkoctopus.s3-us-west-1.amazonaws.com/demo1.mpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJJUCSYT27AMWGFZQ/20200408/us-west-1/s3/aws4_request&X-Amz-Date=20200408T123537Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=88cc727ffb81561dc8650c2f07f66f56c4ee062e299ef8197925e591610538c0"
        },
        "variables": 
        {
            "Video Height": "360",
            "Video Width": "640"
        }
    },

    "storage_references": {
        "9dff864e-045c-4b58-8cb1-12221bd89c6b": {
            "store_id": "240f042bfc4bee58a965c7d79e17c45c",
            "folder_offset": "/folder1/project1/"
        }
    },

    "progress": 100,
    "state": "succeeded",
    "status": "completed",
    "action_jobs": 
    [
        {
            "id": "9e5659a4ac0784be5551cc540dbdfc1e",
            "action_name": "IPTV",
            "state": "succeeded",
            "status": "completed",
            "progress": 100,
            "inputs": 
          	[
                {
                    "id": "4073d2c93434f0ad8f7194856cce670a",
                    "name": "Original",
                    "url": "https://johnkoctopus.s3-us-west-1.amazonaws.com/demo1.mpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJJUCSYT27AMWGFZQ/20200408/us-west-1/s3/aws4_request&X-Amz-Date=20200408T123537Z&X-Amz-Expires=604800&X-Amz-SignedHeaders=host&X-Amz-Signature=88cc727ffb81561dc8650c2f07f66f56c4ee062e299ef8197925e591610538c0",
                    "duration": 30000,
                    "file_size": 30158984
                }
            ],

            "outputs":
          	[
                {
                    "id": "ac870f507d93945e1ccfcae5fd09b38b",
                    "name": "cloudTransportStreamOutput",
                    "remote_path": "/folder1/project1/",
                    "duration": 30030,
                    "file_size": 73077860,
                    "files": 
                  	[
                        "demo1.ts"
                    ]
                }
            ],

            "store_id": "240f042bfc4bee58a965c7d79e17c45c",
            "created_at": "2020-04-10T17:02:01.766665Z",
            "updated_at": "2020-04-10T17:05:47.249575Z",
            "started_processing_at": "2020-04-10T17:05:33.788055Z",
            "finished_processing_at": "2020-04-10T17:05:44.402181Z",
            "error_class": "",
            "error_message": ""
        }
    ],

    "workflow_version": 0,
    "created_at": "2020-04-10T17:01:48.090967Z",
    "updated_at": "2020-04-10T17:05:54.376076Z"
}

The details for a given job allows a user to infer the location of each output generated by a particular action within the workflow.

The workflow above had a single action (the IPTV Flip) present. The following sub-section of JSON from the workflow details provides the information about what was emitted by the action (the ‘output’).

560

The most important aspects of the OUTPUT section are highlighted in green above.

The information above indicates that the output file: demo1.ts was created in the folder structure: /folder1/project1/ within the Telestream Cloud store identified by store ID: 240f042bfc4bee58a965c7d79e17c45c

The Store with this ID was previously created for Telestream Cloud (earlier); and browsing to this object store (in a utility such as Cyberduck) allows the bucket and folder structure/file to be verified:

1134