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/4e1f5200-1b58-4a9f-89c9-966b8ae1a373/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":"1a2b91f6-0cbe-4867-a359-ffc54aefc428"}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ2OCIsImVtYWlsIjoiZW1haWwtMzM2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2OTR9.-sEih3g843Jb94DB1bdN0-u5YIhksxg-bpKcoYN124E
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/4e1f5200-1b58-4a9f-89c9-966b8ae1a373/copy_bits" -d '{"source_app_guid":"1a2b91f6-0cbe-4867-a359-ffc54aefc428"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ2OCIsImVtYWlsIjoiZW1haWwtMzM2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2OTR9.-sEih3g843Jb94DB1bdN0-u5YIhksxg-bpKcoYN124E" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "82972e28-d516-4b5b-a6ae-6cfb3046e037",
    "created_at": "2016-03-17T21:41:34Z",
    "url": "/v2/jobs/82972e28-d516-4b5b-a6ae-6cfb3046e037"
  },
  "entity": {
    "guid": "82972e28-d516-4b5b-a6ae-6cfb3046e037",
    "status": "queued"
  }
}

Headers

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