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/69b6597e-f320-4926-a5c8-aaf8bdfc60d0/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":"8bf0660e-dc8a-482a-885b-9c142502df2e"}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/apps/69b6597e-f320-4926-a5c8-aaf8bdfc60d0/copy_bits" -d '{"source_app_guid":"8bf0660e-dc8a-482a-885b-9c142502df2e"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE0NCIsImVtYWlsIjoiZW1haWwtMTA1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0MzJ9.eDFQ2K7NHUyPwvTjXxjAcEvGdknCXAAgjxeTXmk0eOE" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "d4616b69-693a-4a88-b5ae-b3f5440aa1de",
    "created_at": "2016-03-14T22:30:32Z",
    "url": "/v2/jobs/d4616b69-693a-4a88-b5ae-b3f5440aa1de"
  },
  "entity": {
    "guid": "d4616b69-693a-4a88-b5ae-b3f5440aa1de",
    "status": "queued"
  }
}

Headers

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