Get details of an app

This call returns information about the specified app. The app should be one in a project that you can access; this could be an app that has been uploaded to the Seven Bridges Platform by a project member, or a publicly available app that has been copied to the project.

Request

https://api.sbgenomics.com/v2/apps/{app_id}
https://eu-api.sbgenomics.com/v2/apps/{app_id}

👍

app_ids

Recall from the apps section in the API overview that the app_id has the form {project_owner}/{project}/{app_short_name}/{revision_number}.

If the revision_number field is omitted, the latest revision of the app is returned

You can get the app_id for an app by making the call to list all apps available to you

Example request

GET /v2/apps/rfranklin/my-project/bamtools-index-2-4-0 HTTP/1.1
Host: api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
curl  -s -H "X-SBG-Auth-Token: 6282d5e2121d43e7900e9d52b15845e7" -H "content-type: application/json" -X GET "https://api.sbgenomics.com/v2/apps/rfranklin/my-project/bamtools-index-2-4-0"
from sevenbridges import Api

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

# send GET request to SB API
app = api.apps.get(id='rfranklin/my-project/bamtools-index-2-4-0')

print(app.name, app.revision)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Path parameters

Name

Description

app_id

The ID for the app you are querying. It can be obtained by making the call to list all apps available to you

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/apps/rfranklin/my-project/bamtools-index-2-4-0/0",
    "id": "rfranklin/my-project/bamtools-index-2-4-0/0",
    "project": "rfranklin/my-project",
    "name": "BamTools Index",
    "revision": 0,
    "raw": {
        "sbg:categories": [
            "SAM/BAM-Processing",
            "Indexing"
        ],
        "sbg:image_url": null,
        "requirements": [
            {
                "class": "ExpressionEngineRequirement",
                "id": "#cwl-js-engine",
                "requirements": [
                    {
                        "class": "DockerRequirement",
                        "dockerPull": "rabix/js-engine"
                    }
                ]
            }
        ],
        "baseCommand": [
            {
                "class": "Expression",
                "script": "{\n  if ($job.inputs.input_bai_file){\n \treturn\"echo Skipping index step because BAI file is provided on the input.\"\n  }\n  else{\n    return \"/opt/bamtools/bin/bamtools index\"\n  }\n}",
                "engine": "#cwl-js-engine"
            }
        ],
        "class": "CommandLineTool",
        "sbg:cmdPreview": "/opt/bamtools/bin/bamtools index  -in input_bam.bam",
        "sbg:homepage": "https://github.com/pezmaster31/bamtools/wiki",
        "label": "BamTools Index",
        "outputs": [
            {
                "description": "Output BAM file with index (BAI or BTI) file as a secondary file (not visible in the output list of the task).",
                "type": [
                    "null",
                    "File"
                ],
                "id": "#output_bam_file",
                "label": "Output BAM file",
                "outputBinding": {
                    "glob": {
                        "class": "Expression",
                        "script": "{\n  if ($job.inputs.indexed_data === true){\n\treturn ''\n  } else {\n    return $job.inputs.input_bam_file.path.split(\"/\").pop()\n  }\n}\n\n\n",
                        "engine": "#cwl-js-engine"
                    },
                    "secondaryFiles": [
                        ".bai",
                        ".bti"
                    ],
                    "sbg:inheritMetadataFrom": "#input_bam_file"
                },
                "sbg:fileTypes": "BAM"
            },
            {
                "description": "Generated index file (without the indexed data).",
                "type": [
                    "null",
                    "File"
                ],
                "id": "#generated_index",
                "label": "Generated index file",
                "outputBinding": {
                    "glob": "{*.bai,*.bti}",
                    "sbg:inheritMetadataFrom": "#input_bam_file"
                },
                "sbg:fileTypes": "BAI,BTI"
            }
        ],
        "cwlVersion": "sbg:draft-2",
        "temporaryFailCodes": [],
        "sbg:job": {
            "inputs": {
                "bti_format": false,
                "indexed_data": false,
                "input_bam_file": {
                    "class": "File",
                    "path": "input/input_bam.bam",
                    "size": 0,
                    "secondaryFiles": []
                }
            },
            "allocatedResources": {
                "mem": 1000,
                "cpu": 1
            }
        },
        "sbg:toolkitVersion": "2.4.0",
        "arguments": [
            {
                "position": 0,
                "separate": true,
                "valueFrom": {
                    "class": "Expression",
                    "script": "{\n  if (!(typeof $job.inputs.input_bai_file !== \"undefined\")){\n    return \"-in \" + $job.inputs.input_bam_file.path.split('/').pop() \n  }\n}",
                    "engine": "#cwl-js-engine"
                }
            },
            {
                "position": 1,
                "separate": true,
                "valueFrom": {
                    "class": "Expression",
                    "script": "{\n  if (!(typeof $job.inputs.input_bai_file !== \"undefined\"))\n    if ((typeof $job.inputs.bti_format !== \"undefined\") && ($job.inputs.bti_format))\n    \treturn \"-bti\"  \n}",
                    "engine": "#cwl-js-engine"
                }
            }
        ],
        "sbg:license": "The MIT License",
        "hints": [
            {
                "dockerImageId": "f808163d4cd3",
                "class": "DockerRequirement",
                "dockerPull": "images.sbgenomics.com/markop/bamtools:2.4.0"
            },
            {
                "value": 1,
                "class": "sbg:CPURequirement"
            },
            {
                "value": 1000,
                "class": "sbg:MemRequirement"
            }
        ],
        "sbg:links": [
            {
                "label": "Homepage",
                "id": "https://github.com/pezmaster31/bamtools"
            },
            {
                "label": "Wiki",
                "id": "https://github.com/pezmaster31/bamtools/wiki"
            }
        ],
        "stdout": "",
        "description": "BamTools Index creates an index file (BAI or BTI) for a BAM file. If BAI file is present on the input the tool will skip indexing step and output BAM with provided BAI file.\n\n**Common issues:** Providing a BAI file on input will result in a pass-through without execution, even if a different index format is requested on the output (BTI instead of BAI).",
        "sbg:toolkit": "BamTools",
        "successCodes": [],
        "inputs": [
            {
                "description": "The input BAM file.",
                "type": [
                    "File"
                ],
                "id": "#input_bam_file",
                "sbg:stageInput": "link",
                "label": "Input BAM file",
                "sbg:category": "Input & Output",
                "sbg:fileTypes": "BAM"
            },
            {
                "type": [
                    "null",
                    "boolean"
                ],
                "label": "BTI format",
                "id": "#bti_format",
                "sbg:category": "Input & Output",
                "description": "Create (non-standard) BamTools index file (*.BTI). Default behavior is to create standard BAM index (*.BAI)."
            },
            {
                "description": "Input BAI(BAM index) file.",
                "type": [
                    "null",
                    "File"
                ],
                "id": "#input_bai_file",
                "sbg:stageInput": "link",
                "label": "Input BAI(BAM index) file",
                "sbg:category": "File input",
                "sbg:fileTypes": "BAI"
            },
            {
                "type": [
                    "null",
                    "boolean"
                ],
                "label": "Don't output indexed data file",
                "id": "#indexed_data",
                "sbg:category": "Input & Output",
                "description": "Don't output indexed data file. The default value is [FALSE]."
            }
        ],
        "stdin": "",
        "sbg:toolAuthor": "Derek Barnett, Erik Garrison, Gabor Marth, and Michael Stromberg",
        "$namespaces": {
            "sbg": "https://sevenbridges.com"
        },
        "sbg:appVersion": [
            "sbg:draft-2"
        ],
        "id": "https://api.sbgenomics.com/v2/apps/rfranklin/my-project/bamtools-index-2-4-0/0/raw/",
        "sbg:id": "rfranklin/my-project/bamtools-index-2-4-0/0",
        "sbg:revision": 0,
        "sbg:revisionNotes": "Copy of admin/sbg-public-data/bamtools-index-2-4-0/30",
        "sbg:modifiedOn": 1584016152,
        "sbg:modifiedBy": "rfranklin",
        "sbg:createdOn": 1584016152,
        "sbg:createdBy": "rfranklin",
        "sbg:project": "rfranklin/my-project",
        "sbg:projectName": "My project",
        "sbg:sbgMaintained": false,
        "sbg:validationErrors": [],
        "sbg:contributors": [
            "rfranklin"
        ],
        "sbg:latestRevision": 0,
        "sbg:revisionsInfo": [
            {
                "sbg:revision": 0,
                "sbg:modifiedBy": "rfranklin",
                "sbg:modifiedOn": 1584016152,
                "sbg:revisionNotes": "Copy of admin/sbg-public-data/bamtools-index-2-4-0/30"
            }
        ],
        "sbg:publisher": "sbg",
        "sbg:content_hash": null,
        "sbg:copyOf": "admin/sbg-public-data/bamtools-index-2-4-0/30"
    }
}