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.

Fields

Name Description Default Valid Values Example Values
source_app_guid The guid for the source app

Parameters

Name Description Valid Values Example Values
guid The guid of the App

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4NiIsImVtYWlsIjoiZW1haWwtMjg4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczODF9.h5pL6LgvRfvzN-bNMZY5Pwu05e2PSNYQh06g-m1j-Po
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v2/apps/19110257-7c21-4b8d-907e-3553164743ac/copy_bits

Body

{"source_app_guid":"e1ec53b7-158a-40b9-aa6a-b1d1f68a2dae"}

cURL

curl "https://api.[your-domain.com]/v2/apps/19110257-7c21-4b8d-907e-3553164743ac/copy_bits" -d '{"source_app_guid":"e1ec53b7-158a-40b9-aa6a-b1d1f68a2dae"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4NiIsImVtYWlsIjoiZW1haWwtMjg4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczODF9.h5pL6LgvRfvzN-bNMZY5Pwu05e2PSNYQh06g-m1j-Po" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: cf52a8f8-6dcd-483a-8cae-279753860e6c
Content-Length: 270
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "9e7658fc-48dc-4127-a932-84dd5b5d7f25",
    "created_at": "2015-02-10T01:43:01Z",
    "url": "/v2/jobs/9e7658fc-48dc-4127-a932-84dd5b5d7f25"
  },
  "entity": {
    "guid": "9e7658fc-48dc-4127-a932-84dd5b5d7f25",
    "status": "queued"
  }
}