Home
Version 3
Apps API

Apps API

Copy the app bits for an App

POST /v2/apps/:guid/copy_bits

This endpoint will copy the package bits in the blobstore from the source app to the destination app. It will always return a job which you can query for success or failure. This operation will require the app to restart in order for the changes to take effect.

Request

Route

POST /v2/apps/28f7c7b9-2705-41a8-a169-64c114e92230/copy_bits

Parameters

Name Description Valid Values Example Values
guid The guid of the App

Body

Name Description Default Valid Values Example Values
source_app_guid The guid for the source app
{"source_app_guid":"ca58cc75-4f53-4ada-88dc-4083c0ba04c3"}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwMiIsImVtYWlsIjoiZW1haWwtMjczQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM2OTh9.I5beA_HAdQqxjKPbfacJ3A6Iou09v1LnHWJpMTpsjsA
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/28f7c7b9-2705-41a8-a169-64c114e92230/copy_bits" -d '{"source_app_guid":"ca58cc75-4f53-4ada-88dc-4083c0ba04c3"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwMiIsImVtYWlsIjoiZW1haWwtMjczQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM2OTh9.I5beA_HAdQqxjKPbfacJ3A6Iou09v1LnHWJpMTpsjsA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "c17b0fd9-5316-49a1-a6db-3232fb8b5898",
    "created_at": "2015-12-22T18:28:18Z",
    "url": "/v2/jobs/c17b0fd9-5316-49a1-a6db-3232fb8b5898"
  },
  "entity": {
    "guid": "c17b0fd9-5316-49a1-a6db-3232fb8b5898",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 270
X-Content-Type-Options: nosniff