Copy an app

/apps/{app_id}/actions/copy

For general information on the API, including formatting, parameters, and pagination, please see the API Overview.

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

https://cavatica-api.sbgenomics.com/v2/apps/{app_id}/actions/copy

šŸ‘

app_ids

Recall from the API Overview that the app_id has the form {project_owner}/{project}/{app_short_name}/{revision_number}

Note that if you omit the revision_number, the API will use the latest app revision.

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

Request

Example request

POST /v2/apps/RFranklin/my-project/bamtools-merge-2-4-0/0/actions/copy HTTP/1.1
Host: cavatica-api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f74
curl --data '{"project": "RFranklin/my-project", "name": "new app name"}'  -s -H "X-SBG-Auth-Token: 7942f56901534434a054dafc3813bc96" -H "content-type: application/json" -X POST "https://cavatica-api.sbgenomics.com/v2/apps/RFranklin/sandbox/delly2-workflow/actions/copy"

Header Fields

NameDescription
X-SBG-Auth-Token
required
Your CAVATICA authentication token.

Path parameters

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

Query parameters

NameData typeDescription
fieldsstringSelector specifying a subset of fields to include in the response.

Request body

The body should contain the following key-value pairs:

KeyDatatype of valueDescription of value
"project"
required
stringThe name of the project you want to copy the app to
"name"stringThe new name the app will have in the target project. If its name will not change, omit this key.
"strategy"stringThe method for copying the app (also see the diagram below).

clone - copy all revisions and continue getting updates form the original app (default method when the key is omitted)
direct - copy only the latest revision and get the updates from this point on
* transient - copy only the latest revision and continue getting updates from the original app.

Methods for copying an app

653653

Example request body

{
  "project": "RFranklin/my-project", 
  "name": "new app name"
}

Response

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

Example response body

This call returns the full CWL description of the copied app. This is typically a lengthy JSON object; for conciseness, we have not included it here, but made it available on this page.


Language