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/22dea413-6be4-4c40-ad21-7aa2796382b0/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":"97178bc8-adbe-4c14-9aad-bbb88b70a27d"}

Headers

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

cURL

curl "https://api.[your-domain.com]/v2/apps/22dea413-6be4-4c40-ad21-7aa2796382b0/copy_bits" -d '{"source_app_guid":"97178bc8-adbe-4c14-9aad-bbb88b70a27d"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzNyIsImVtYWlsIjoiZW1haWwtOTdAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyOTAzODcwMn0.atdfj3AYWiXGhW_0oEBVV3D7YtfDzeGKw6zSJbgFqfY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "c8bd2e40-333c-44c4-b393-f59da02571b8",
    "created_at": "2015-04-07T19:11:42Z",
    "url": "/v2/jobs/c8bd2e40-333c-44c4-b393-f59da02571b8"
  },
  "entity": {
    "guid": "c8bd2e40-333c-44c4-b393-f59da02571b8",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 5e572bb6-89fa-464c-859f-84cef0dc590d
Content-Length: 270
X-Content-Type-Options: nosniff