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/70a76edc-25ad-4308-b142-e4d2b6b281db/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":"ea20d730-22cb-44c9-9b8b-b1c5d1ca03dd"}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1OCIsImVtYWlsIjoiZW1haWwtMTkxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjYxODc3NTF9.33e98qXcFr7HdjzRuI1zv3RsILjtw4esdAWmJguKxuU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/70a76edc-25ad-4308-b142-e4d2b6b281db/copy_bits" -d '{"source_app_guid":"ea20d730-22cb-44c9-9b8b-b1c5d1ca03dd"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1OCIsImVtYWlsIjoiZW1haWwtMTkxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjYxODc3NTF9.33e98qXcFr7HdjzRuI1zv3RsILjtw4esdAWmJguKxuU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "227898da-aab4-4f37-ad09-fc37ea98b481",
    "created_at": "2015-03-05T19:15:51Z",
    "url": "/v2/jobs/227898da-aab4-4f37-ad09-fc37ea98b481"
  },
  "entity": {
    "guid": "227898da-aab4-4f37-ad09-fc37ea98b481",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: a9c888b3-5cfb-41aa-933a-5d8d00aa36d5
Content-Length: 270
X-Content-Type-Options: nosniff