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/cd3d3185-2b8a-44ac-8a44-bf3d3c109697/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":"eaf1498e-c0c4-431b-a46c-a08aa925c88c"}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/apps/cd3d3185-2b8a-44ac-8a44-bf3d3c109697/copy_bits" -d '{"source_app_guid":"eaf1498e-c0c4-431b-a46c-a08aa925c88c"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTExMSIsImVtYWlsIjoiZW1haWwtNzhAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0OTUzMTUxNn0.Lhr4oQrSm92kz9D3rikIkK7FKZhAn5jQndduGxaUb_U" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "18107dfb-6f16-4442-88d4-b1a92f2b1e00",
    "created_at": "2015-11-30T23:38:35Z",
    "url": "/v2/jobs/18107dfb-6f16-4442-88d4-b1a92f2b1e00"
  },
  "entity": {
    "guid": "18107dfb-6f16-4442-88d4-b1a92f2b1e00",
    "status": "queued"
  }
}

Headers

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