Get task execution details

❗️

Early release status

Note that this is a fully-functional early release feature. The call, and the format of the information returned is subject to change.

This call returns execution details of the specified task. The task is referred to by its ID, which you can obtain by making the call to list all tasks you can access.

The call breaks down the information into the task's distinct jobs. A job is a single subprocess carried out in a task.

The information returned by this call is broadly similar to that which can be found in the task stats and logs provided on the Platform.

Request

https://api.sbgenomics.com/v2/tasks/{task_id}/execution_details
https://eu-api.sbgenomics.com/v2/tasks/{task_id}/execution_details

The task execution details include the following information:

  • The name of the command line job that executed
  • The start time of the job
  • End time of the job (if it completed)
  • The status of the job (DONE, FAILED, or RUNNING)
  • Information on the computational instance that the job was run on, including the provider ID, the type of instance used and the cloud service provider
  • A link that can be used to download the standard error logs for the job
  • SHA hash of the Docker image ('checksum')

Example request

GET /v2/tasks/08c5ce64-1551-4b7d-b054-63a1517bc7bb/execution_details HTTP/1.1
Host: api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea9t6573259740f74
curl -s -H "X-SBG-Auth-Token: 3259c50e1ac5426ea9t6573259740f74" -H "content-type: application/json" -X GET "https://api.sbgenomics.com/v2/tasks/08c5ce64-1551-4b7d-b054-63a1517bc7bb/execution_details"
from sevenbridges import Api

api = Api(url='https://api.sbgenomics.com/v2',
          token='3259c50e1ac5426ea8f1273259740f74')

task = api.tasks.get(id='08c5ce64-1551-4b7d-b054-63a1517bc7bb')

# send GET request to SB API
execution_details = task.get_execution_details()

print(execution_details.status, execution_details.message)
for job in execution_details.jobs:
    print(job.name, job.start_time, job.end_time)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Path parameters

Name

Description

task_id
required

The ID of the task you are querying

Query parameters

Name

Data type

Description

fields

string

Selector specifying a subset of fields to include in the response.

Response

See a list of Seven Bridges Platform-specific response codes that may be contained in the body of the response.

Example response body

{
  "href": "https://api.sbgenomics.com/v2/tasks/08c5ce64-1551-4b7d-b054-63a1517bc7bb/execution_details",
  "start_time": "2017-04-20T15:30:11Z",
  "end_time": "2017-04-20T15:36:29Z",
  "status": "COMPLETED",
  "message": "Completed",
  "jobs": [
    {
      "name": "FastQC_1_0_s",
      "start_time": "2017-04-20T15:33:41Z",
      "end_time": "2017-04-20T15:34:25Z",
      "status": "COMPLETED",
      "command_line": "fastqc --noextract --outdir . --quiet --threads 4 /sbgenomics/Projects/10e26e13-cf6a-4c44-8f58-b7352187b50e/hg00105.srr711354.fastq",
      "instance": {
        "id": "i-054205ac85c9debcf",
        "type": "c4.2xlarge",
        "provider": "AWS",
        "disk": {
          "size": 1024,
          "unit": "GB",
          "type": "amazon-gp2"
        }
      },
      "logs": {
        "cmd.log": "https://api.sbgenomics.com/v2/files/58f8d4d11c947a1eecc6d563/download_info",
        "job.err.log": "https://api.sbgenomics.com/v2/files/58f8d4f41c947a1eecc6d56d/download_info",
        "job.tree.log": "https://api.sbgenomics.com/v2/files/58f8d5001c947a1eecc6d58f/download_info",
        "stderr": "https://api.sbgenomics.com/v2/files/58f8d4f41c947a1eecc6d56d/download_info"
      },
      "docker": {
        "checksum": "sha256:642f70b2d64dffa562d4aea95aa0850a69ab8b09922b56b0b92e40a741cddd29"
      }
    },
    {
      "name": "SBG_Html2b64_1_0_s",
      "start_time": "2017-04-20T15:35:54Z",
      "end_time": "2017-04-20T15:36:27Z",
      "status": "COMPLETED",
      "command_line": "python /opt/sbg_html_to_b64.py --input /sbgenomics/Projects/10e26e13-cf6a-4c44-8f58-b7352187b50e/workspace/48ed6043-d531-42be-afb1-d2d5bbae6ca3/fastqc-analysis_FastQC_1_0_s/hg00105.srr711354_fastqc.zip",
      "instance": {
        "id": "i-054205ac85c9debcf",
        "type": "c4.2xlarge",
        "provider": "AWS",
        "disk": {
          "size": 1024,
          "unit": "GB",
          "type": "amazon-gp2"
        }
      },
      "logs": {
        "cmd.log": "https://api.sbgenomics.com/v2/files/58f8d55a1c947a1eecc6d5aa/download_info",
        "job.err.log": "https://api.sbgenomics.com/v2/files/58f8d5781c947a1eecc6d5b4/download_info",
        "job.tree.log": "https://api.sbgenomics.com/v2/files/58f8d57b1c947a1eecc6d5ce/download_info",
        "stderr": "https://api.sbgenomics.com/v2/files/58f8d5781c947a1eecc6d5b4/download_info"
      },
      "docker": {
        "checksum": "sha256:0a7b35a10596c43f6b2375e511692e09e6c3fbc3870c106b18bc4dac3bb21ea8"
      }
    }
  ]
}