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/d39db96d-d6ad-4d97-9590-f8b720937e48/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":"9bddca19-01b3-42f2-9310-7cabab2da46e"}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/apps/d39db96d-d6ad-4d97-9590-f8b720937e48/copy_bits" -d '{"source_app_guid":"9bddca19-01b3-42f2-9310-7cabab2da46e"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwMyIsImVtYWlsIjoiZW1haWwtMjIwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk3OTR9.VpX_r3BgPoH4lAGOoiMErbWp4dLMCTF_SFf7eadHoOQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "2769d02c-e189-4fdc-b2e7-46730ac5f19f",
    "created_at": "2015-07-06T23:23:13Z",
    "url": "/v2/jobs/2769d02c-e189-4fdc-b2e7-46730ac5f19f"
  },
  "entity": {
    "guid": "2769d02c-e189-4fdc-b2e7-46730ac5f19f",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: c600bce4-59ec-471c-99e3-1cb6c5ee0fdd
Content-Length: 270
X-Content-Type-Options: nosniff