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/c35dbf5b-e31e-458c-bd92-896f0718012e/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":"0d12128c-7e2d-4344-9c35-7b2bb4748d83"}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTU2IiwiZW1haWwiOiJlbWFpbC01NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDMyMzEzNjA3fQ.Hpm_hAt0pNJsBz2afYPR0tdiLHu7M1px_Hhd_PEO-Ag
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/c35dbf5b-e31e-458c-bd92-896f0718012e/copy_bits" -d '{"source_app_guid":"0d12128c-7e2d-4344-9c35-7b2bb4748d83"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTU2IiwiZW1haWwiOiJlbWFpbC01NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDMyMzEzNjA3fQ.Hpm_hAt0pNJsBz2afYPR0tdiLHu7M1px_Hhd_PEO-Ag" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "012d1777-d75d-4049-bbd3-1f0cec2763ff",
    "created_at": "2015-05-15T16:53:27Z",
    "url": "/v2/jobs/012d1777-d75d-4049-bbd3-1f0cec2763ff"
  },
  "entity": {
    "guid": "012d1777-d75d-4049-bbd3-1f0cec2763ff",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: c5a7fafa-70fb-4b96-8f64-50ad96417b6b
Content-Length: 270
X-Content-Type-Options: nosniff