Add an app revision using raw CWL

This call creates a new revision for an existing app. It adds a new CWL app description, and stores it as the named revision for the specified app. The revision number must not already exist and should follow the sequence of previously created revisions.

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

👍

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}.

For this particular call, you need to explicitly specify the app revision number.

Request

Example request

POST /v2/apps/RFranklin/my-project/my-app/4/raw HTTP/1.1
Host: api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
curl --data-binary '@my-app.json' -s -H "X-SBG-Auth-Token: 7942f56901534434a054dafc3813bc96" -H "content-type: application/json" -X POST "https://api.sbgenomics.com/v2/apps/RFranklin/my-project/my-app/4/raw"
from sevenbridges import Api

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

# send POST request to SB API
new_app_revision = api.apps.create_revision(
    id='RFranklin/my-project/my-app',
    revision=4,
    raw='... CWL JSON/YAML HERE ...'
)

print(new_app_revision.name, new_app_revision.id, new_app_revision.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 you want to upload. It should reference the project that you want the app to be added to, a short name for the app (containing no non-alphanumeric characters or spaces), and a revision number.

Query parameters

Name

Data type

Description

fields

string

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

Request body

The body of the request should be a CWL app description, saved as a JSON file. For a template of this description, try making the call to get raw app information about an app already in one of your projects.