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/993ac32a-7602-4d5a-94c7-c6daed44c0f0/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":"d4701baf-ec65-4df6-b10e-69706c23fd09"}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ0NSIsImVtYWlsIjoiZW1haWwtMzEzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NjN9.B7nHPY64iPKmmyo_B9z67563Dyy167hSQ_T-yWEMaQc
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/993ac32a-7602-4d5a-94c7-c6daed44c0f0/copy_bits" -d '{"source_app_guid":"d4701baf-ec65-4df6-b10e-69706c23fd09"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ0NSIsImVtYWlsIjoiZW1haWwtMzEzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NjN9.B7nHPY64iPKmmyo_B9z67563Dyy167hSQ_T-yWEMaQc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "3abc9450-5e08-4d49-8278-1b7a5dd9db8a",
    "created_at": "2015-09-30T23:31:03Z",
    "url": "/v2/jobs/3abc9450-5e08-4d49-8278-1b7a5dd9db8a"
  },
  "entity": {
    "guid": "3abc9450-5e08-4d49-8278-1b7a5dd9db8a",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 849c51c0-6ab7-4fac-a96c-f02ec07daea2
Content-Length: 270
X-Content-Type-Options: nosniff