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/d856c4b8-1311-4fda-b956-d363c81e4335/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":"f9bab369-9176-42a8-ae9f-93eef9c904dc"}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/apps/d856c4b8-1311-4fda-b956-d363c81e4335/copy_bits" -d '{"source_app_guid":"f9bab369-9176-42a8-ae9f-93eef9c904dc"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTc1IiwiZW1haWwiOiJlbWFpbC00M0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ1MzYyMjk4fQ.i5C6eL6tRSRTsAT_uQIz8YsDGx62ilDV3AAtQwpsyyw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "adeb591f-1ec6-4bab-a4c7-416b0956a08c",
    "created_at": "2015-10-13T17:31:38Z",
    "url": "/v2/jobs/adeb591f-1ec6-4bab-a4c7-416b0956a08c"
  },
  "entity": {
    "guid": "adeb591f-1ec6-4bab-a4c7-416b0956a08c",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 96c56fef-3746-41ca-a9c0-f74ed7118202
Content-Length: 270
X-Content-Type-Options: nosniff