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/1e188941-5ca8-4b5d-aa14-bd2b6e4d36fe/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":"b7c82f1a-2276-4788-9d51-c1b3e58a3f11"}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/apps/1e188941-5ca8-4b5d-aa14-bd2b6e4d36fe/copy_bits" -d '{"source_app_guid":"b7c82f1a-2276-4788-9d51-c1b3e58a3f11"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE0MCIsImVtYWlsIjoiZW1haWwtMTA5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjA1MDY2NDR9._ZIJRIdZxmglwU1HtlcpD38JaSDZyM10n6VI4E6tT9M" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "683d6e7a-0212-4ce4-9549-b897d91ad798",
    "created_at": "2016-04-06T00:17:24Z",
    "url": "/v2/jobs/683d6e7a-0212-4ce4-9549-b897d91ad798"
  },
  "entity": {
    "guid": "683d6e7a-0212-4ce4-9549-b897d91ad798",
    "status": "queued"
  }
}

Headers

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