Create a new automation run

This call creates a new automation run.

Request

https://api.sbgenomics.com/v2/automation/runs
https://eu-api.sbgenomics.com/v2/automation/runs

Example request

POST v2/automation/runs
Host: api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f75
curl -X POST \
  https://api.sbgenomics.com/v2/automation/runs \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -H 'X-SBG-Advance-Access: advance' \
  -H 'X-SBG-Auth-Token: b04aa2a2e98348a1a3a75ca677ea7fd7'
  "
    ]
}
'
from sevenbridges import Api

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

# send POST request to SB API
run = api.automation_runs.create(
    package='40a284d9-c0da-441c-8799-3de8d85bbd8d',
    inputs={'x': 1, 'y': 2, 'z': 3},
    name='Automation 1'
)

print(run.id, run.status)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Content-Type
required

application/json

X-SBG-Advance-Access
required

advance

###Request body
In the body, you should enter a list of key-value pairs. The keys, and the values they take, are described in the following table.

Name

Data type

Description

name
required

string

The name of the automation run you are creating.

package

string

The ID of the automation code package."

'memory_limit'

integer

Set the memory limit for the automation run, specified in MB.

The default value is 500MB while the maximum allowed is 4000MB.

If omitted, the value will be inherited from the code package or the automation entity.

inputs

dictionary of key-value pairs

Automation inputs specified as a JSON string.

settings

dictionary of key-value pairs

Use these settings to specify automation settings (and override default automation settings).

secret_settings

dictionary of key-value pairs

Same as above with the only difference that these values will not be logged or visible anywhere. You can use this field to specify credentials or any other confidential information.

Example request body

{
  "name": "Automation 1",
  "package": "40a284d9-c0da-441c-8799-3de8d85bbd8d",
  "memory_limit": 1000
  "inputs":"{
        "x": 1,
        "y": 2,
        "z": 3
    },
  "settings":"null",  "secret_settings":""
}

Response

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

Example response body

{
    "id": "e5ed2ee7-8f3c-44e9-bc78-4cabd2ee441f",
    "href": "https://api.sbgenomics.com/v2/automation/runs/e5ed2ee7-8f3c-44e9-bc78-4cabd2ee441f",
    "automation": {
        "id": "40a284d9-c0da-441c-8799-3de8d85bbd8d",
        "href": "https://api.sbgenomics.com/v2/automation/automations/40a284d9-c0da-441c-8799-3de8d85bbd8d",
        "name": "Automation 1",
        "description": "This is the description for the Automation 1",
        "owner": "rfranklin",
        "created_by": "rfranklin",
        "created_on": "2018-08-27T18:12:13.000+02:00",
        "modified_on": "2018-08-27T16:12:13.000000",
        "modified_by": "rfranklin"
    },
    "inputs": {
        "x": 1,
        "y": 2,
        "z": 3
    },
    "settings": null,
    "status": "ABORTED",
    "message": "Automation \"state.json\" and/or \"automation.log\" not found.",
    "package": {
        "id": "c291f294-f46b-4a9e-a702-e9fb2fbf751f",
        "automation": "40a284d9-c0da-441c-8799-3de8d85bbd8d",
        "version": "1.0.0",
        "location": "5b84276ee4b0e7481db7d94d",
        "created_by": "fcrick",
        "created_on": "2018-08-27T16:32:23.072Z"
    },
    "memory_limit: 1000
    "created_on": "2018-08-30T16:10:33.203Z",
    "start_time": "2018-08-30T16:10:36.247Z",
    "end_time": "2018-08-30T16:10:44.181Z",
    "resumed_from": null,
    "created_by": "rfranklin",
    "execution_details": null
}
}