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/162b13f1-83dd-4385-a8a2-838a05f10990/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":"af6ab819-3fb7-42e3-a0f6-947022881b7b"}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5NyIsImVtYWlsIjoiZW1haWwtMjg3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE4MTR9.jZZPMYSTb56jjSeKdw_Ix2Jo-7DXITtnvffYJhe_cog
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/162b13f1-83dd-4385-a8a2-838a05f10990/copy_bits" -d '{"source_app_guid":"af6ab819-3fb7-42e3-a0f6-947022881b7b"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM5NyIsImVtYWlsIjoiZW1haWwtMjg3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE4MTR9.jZZPMYSTb56jjSeKdw_Ix2Jo-7DXITtnvffYJhe_cog" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "c900719e-c70a-4c75-9e6a-9535f118acc3",
    "created_at": "2015-07-27T22:43:34Z",
    "url": "/v2/jobs/c900719e-c70a-4c75-9e6a-9535f118acc3"
  },
  "entity": {
    "guid": "c900719e-c70a-4c75-9e6a-9535f118acc3",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ee18a60e-4fb5-44ff-a920-a37c72000810
Content-Length: 270
X-Content-Type-Options: nosniff