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/9e999970-ccb8-4770-b82f-039265786f6e/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":"faa9e39d-38ce-464d-9889-0980afbcfa4f"}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/apps/9e999970-ccb8-4770-b82f-039265786f6e/copy_bits" -d '{"source_app_guid":"faa9e39d-38ce-464d-9889-0980afbcfa4f"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1NyIsImVtYWlsIjoiZW1haWwtMTkxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjE5NTg0MDV9.vCsmttGgHzfcpWcRktJzkB6vcZq4h3PdtyLv8m6z9K4" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "183ce8ec-49ce-4782-9937-565dd8381a89",
    "created_at": "2016-04-22T19:33:25Z",
    "url": "/v2/jobs/183ce8ec-49ce-4782-9937-565dd8381a89"
  },
  "entity": {
    "guid": "183ce8ec-49ce-4782-9937-565dd8381a89",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 33be92eb-d036-43ef-9d10-9de23db562e5
Content-Length: 270
X-Content-Type-Options: nosniff