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/c88c4617-eba7-48bc-a233-88e622f008e1/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":"d7d0ed56-1646-4835-9997-f7265b01e11d"}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxOSIsImVtYWlsIjoiZW1haWwtMTUwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjY2MzM5MDV9.RJq-QQ8TLB-5eF3VqBeKWR3bTO_KdzthwBaFMrsPm0c
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/c88c4617-eba7-48bc-a233-88e622f008e1/copy_bits" -d '{"source_app_guid":"d7d0ed56-1646-4835-9997-f7265b01e11d"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxOSIsImVtYWlsIjoiZW1haWwtMTUwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjY2MzM5MDV9.RJq-QQ8TLB-5eF3VqBeKWR3bTO_KdzthwBaFMrsPm0c" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "83701db5-b30d-4b03-bca9-6ab6c4fe3bc8",
    "created_at": "2015-03-10T23:11:45Z",
    "url": "/v2/jobs/83701db5-b30d-4b03-bca9-6ab6c4fe3bc8"
  },
  "entity": {
    "guid": "83701db5-b30d-4b03-bca9-6ab6c4fe3bc8",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 51eec41a-2fa5-4427-91af-0edd862ae2e3
Content-Length: 270
X-Content-Type-Options: nosniff