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/23330aba-6df2-4681-8602-b99acc255a7e/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":"eef4a036-0f21-45cf-88d8-7aabfbf450a5"}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2OSIsImVtYWlsIjoiZW1haWwtMjAyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjczMjM5NzF9.2HJ2uN0zEUxlrIa6uZ82vNI90-gxENE5-ABegN0BEYE
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/23330aba-6df2-4681-8602-b99acc255a7e/copy_bits" -d '{"source_app_guid":"eef4a036-0f21-45cf-88d8-7aabfbf450a5"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2OSIsImVtYWlsIjoiZW1haWwtMjAyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjczMjM5NzF9.2HJ2uN0zEUxlrIa6uZ82vNI90-gxENE5-ABegN0BEYE" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "14ab7913-1fb4-4d57-b5f2-875a012e0bb6",
    "created_at": "2015-03-18T22:52:51Z",
    "url": "/v2/jobs/14ab7913-1fb4-4d57-b5f2-875a012e0bb6"
  },
  "entity": {
    "guid": "14ab7913-1fb4-4d57-b5f2-875a012e0bb6",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 3e294f1d-dd11-47d7-bbc5-d1525ebf6381
Content-Length: 270
X-Content-Type-Options: nosniff