List all automation runs

This call lists all automaton runs.

Request

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

Example request

GET v2/automation/runs
Host: api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f75
curl -X GET \
  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 GET request to SB API
runs = api.automation_runs.query()

for run in runs:
    print(run.id, run.status, run.automation.name, run.package.version)

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

Query parameters

Name

Data type

Description

automation_id
required

string

The ID of the automation you are listing the runs for.

name

string

Filter automation runs by their name. The search is partial and case-insensitive.

package_id

string

The ID of the package you are listing the runs for.

status

string

The status of the automation run:

  • CREATED
  • RUNNING
  • ABORTED
  • FINISHED
  • FAILED
  • QUEUED_FOR_EXECUTION
  • SENT_TO_EXECUTION
  • QUEUED_FOR_TERMINATION

created_by

string

The username of the user that created the automation run.

created_from

string

Enter the starting date for querying automation runs (e.g. 2018-08-30T16:10:36.247Z".

created_to

string

Enter the ending date for querying the automation runs. You can use it in combination with the created_from to specify a time interval (e.g. 2018-08-30T16:10:44.181Z).

order_by

string

Order runs by this automation run field, e.g. created_on.

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/automation/runs/",
    "items": [
        {
            "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 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": "rfranklin",
                "created_on": "2018-08-27T16:32:23.072Z"
            },
            "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
        },
        {
            "id": "078c74cd-dc25-4eb0-97e0-acea3850a024",
            "href": "https://api.sbgenomics.com/v2/automation/runs/078c74cd-dc25-4eb0-97e0-acea3850a024",
            "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 automation 2.",
                "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": "FINISHED",
            "message": null,
            "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"
            },
            "created_on": "2018-08-30T16:09:37.424Z",
            "start_time": "2018-08-30T16:09:41.208Z",
            "end_time": "2018-08-30T16:09:51.320Z",
            "resumed_from": null,
            "created_by": "rfranklin",
            "execution_details": "/Projects/40e5721f-76c0-4cc1-9544-36f2581e65a2/078c74cd-dc25-4eb0-97e0-acea3850a024/"
        },
        }
    ],
    "links": []
}