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/9f8243d8-b79e-4288-98ac-03eb35ed26ca/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":"5c896969-94ff-4f70-a3b8-bce1162b14c9"}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQzIiwiZW1haWwiOiJlbWFpbC00MkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU2NDUyMjIyfQ.IohlK3vq-evDlavIT7TLvaU8HVyYE4e_JGt9vr-nVH0
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/9f8243d8-b79e-4288-98ac-03eb35ed26ca/copy_bits" -d '{"source_app_guid":"5c896969-94ff-4f70-a3b8-bce1162b14c9"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQzIiwiZW1haWwiOiJlbWFpbC00MkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU2NDUyMjIyfQ.IohlK3vq-evDlavIT7TLvaU8HVyYE4e_JGt9vr-nVH0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "790121e7-a8ac-4131-bcb8-f210f994e857",
    "created_at": "2016-02-19T02:03:42Z",
    "url": "/v2/jobs/790121e7-a8ac-4131-bcb8-f210f994e857"
  },
  "entity": {
    "guid": "790121e7-a8ac-4131-bcb8-f210f994e857",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 
Content-Length: 270
X-Content-Type-Options: nosniff