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/5f9d07ce-5ca6-418f-abf8-c9fe63b7432b/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":"29d27f5c-a74d-4a69-ab8d-19b7224b4c31"}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTYzIiwiZW1haWwiOiJlbWFpbC02MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ3MTE2ODMyfQ.1WWu10lWpBDZBMLQp44OTpoOBR4BDPUUr9eFyoXGXDg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/5f9d07ce-5ca6-418f-abf8-c9fe63b7432b/copy_bits" -d '{"source_app_guid":"29d27f5c-a74d-4a69-ab8d-19b7224b4c31"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTYzIiwiZW1haWwiOiJlbWFpbC02MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ3MTE2ODMyfQ.1WWu10lWpBDZBMLQp44OTpoOBR4BDPUUr9eFyoXGXDg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "b11c4434-1da0-4ad4-bd26-f612c69d45d5",
    "created_at": "2015-11-03T00:53:52Z",
    "url": "/v2/jobs/b11c4434-1da0-4ad4-bd26-f612c69d45d5"
  },
  "entity": {
    "guid": "b11c4434-1da0-4ad4-bd26-f612c69d45d5",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: edcfe6d1-65ef-402e-bd3e-cdbf93d4e066
Content-Length: 270
X-Content-Type-Options: nosniff