/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 CGC by a project member, or a publicly available app that has been copied to the project.
https://cgc-api.sbgenomics.com/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/0/actions/copy HTTP/1.1
Host: cgc-api.sbgenomics.com
X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74
curl --data '{"project": "RFranklin/my-project", "name": "new app name"}' -s -H "X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74" -H "content-type: application/json" -X POST "https://cgc-api.sbgenomics.com/v2/apps/RFranklin/my-project/bamtools-merge-2/0/actions/copy"
Header Fields
Name | Description |
---|---|
X-SBG-Auth-Token required | Your CGC 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. |
Request body
The body should contain the following key-value pairs:
Key | Datatype of value | Description of value |
---|---|---|
"project" required | string | The name of the project you want to copy the app to |
"name" | string | The 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 CGC-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.