Copy an app

/apps/{app_id}/actions/copy

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 the Platform by a project member, or a publicly available app that has been copied to the project.

https://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/apps/{project_owner}/{project}/{app_short_name}/{revision}/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: api.sb.biodatacatalyst.nhlbi.nih.gov
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://api.sb.biodatacatalyst.nhlbi.nih.gov/v2/apps/RFranklin/sandbox/delly2-workflow/actions/copy"

Header Fields

NameDescription
X-SBG-Auth-Token
required
You 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.

Example request body

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

Response

See a list of 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.