Submission LayerRun TasksQuickstart

Quickstart

Summary

This quickstart guide provides the essential steps to run your first task on the Five Safes TES weave.

It covers obtaining authentication tokens, identifying project output buckets, and submitting a simple “Hello World” task through the Submission Layer API.

Prerequisites

💡

If you are following the Five Safes tes All In One Demo then you should only need Project Approval & an Access Token

Run a task

Get Project Output Bucket

The output bucket for a project can be found in the Submission UI. Go to Project -> About page and hover over Output Bucket.

The naming pattern is: <projectName> + <projectUniqueID> + output.

Send task

You can make the request from the Submission Layer Swagger API hosted at http://localhost:5034/swagger.

Authorise the request with the Access Token with the Authorise button on the top right.

POST localhost:5034/v1/tasks
{
    "state": 0,
    "name": "Hello World",
    "inputs": [],
    "outputs": [
        {
            "name": "Stdout",
            "description": "Stdout results",
            "url": "s3://<outputBucketName>", // Set the output bucket
            "path": "/outputs",
            "type": "DIRECTORY"
        }
    ],
    "executors": [
        {
            "image": "ubuntu",
            "command": [
                "echo",
                "Hello World"
            ],
            "workdir": "/outputs",
            "stdout": "/outputs/stdout",
        }
    ],
    "volumes": null,
    "tags": {
        "project": "<ProjectName>", // Project that you would like to submit to.
        "tres": "<TREName>" // TRE related to that Project
    },
    "logs": null,
    "creation_time": null
}
 

More information on the TES payload can be found at the TES API specification website.

Egress

For the data to be released an Egress Manager needs to approve the request.

Results

Once the Egress request has been approved you can view them in the output bucket: