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/5abb2582-f013-4277-83dc-8428c2bc6e74/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":"e65616d7-18b7-494d-bef0-c468e1db9edc"}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/apps/5abb2582-f013-4277-83dc-8428c2bc6e74/copy_bits" -d '{"source_app_guid":"e65616d7-18b7-494d-bef0-c468e1db9edc"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxOSIsImVtYWlsIjoiZW1haWwtMTM3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzM5ODExMDh9.Mk8YhMZZdbfFm2NLM1_oVZJ0OIs1fu4dOcTed7PWojU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "776ecd80-6d8b-4b23-93cf-1c96b1a879b9",
    "created_at": "2015-06-04T00:05:08Z",
    "url": "/v2/jobs/776ecd80-6d8b-4b23-93cf-1c96b1a879b9"
  },
  "entity": {
    "guid": "776ecd80-6d8b-4b23-93cf-1c96b1a879b9",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ddfa352e-3a9b-441d-b876-c4df9c1e1a1f
Content-Length: 270
X-Content-Type-Options: nosniff