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/d788169c-7304-419f-8e40-e5ece8167111/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":"5d2c4a37-80c1-4e36-8106-96b1ef4ca130"}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/apps/d788169c-7304-419f-8e40-e5ece8167111/copy_bits" -d '{"source_app_guid":"5d2c4a37-80c1-4e36-8106-96b1ef4ca130"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2NSIsImVtYWlsIjoiZW1haWwtMjM0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDgwMzg5NjV9.um96eG8kTlG52vBPIcx7exBpMyamNjzMgoFDW2iV4u4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "02cc34f1-72d0-4ba3-a492-ab7e46daff50",
    "created_at": "2015-11-13T17:02:45Z",
    "url": "/v2/jobs/02cc34f1-72d0-4ba3-a492-ab7e46daff50"
  },
  "entity": {
    "guid": "02cc34f1-72d0-4ba3-a492-ab7e46daff50",
    "status": "queued"
  }
}

Headers

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