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/064a4074-5dcc-431c-ba36-b76ad3341b00/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":"8ed6b94c-9c2a-47cc-8599-edad8bb1da5f"}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1NSIsImVtYWlsIjoiZW1haWwtOTFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NTU1NzkzOX0.X_aaMdXkODcnyHApLw32TdcUL7swGNkK-J57eFb2BLY
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/apps/064a4074-5dcc-431c-ba36-b76ad3341b00/copy_bits" -d '{"source_app_guid":"8ed6b94c-9c2a-47cc-8599-edad8bb1da5f"}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1NSIsImVtYWlsIjoiZW1haWwtOTFAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ0NTU1NzkzOX0.X_aaMdXkODcnyHApLw32TdcUL7swGNkK-J57eFb2BLY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "90708923-37de-4b85-8c2a-4149609a68e5",
    "created_at": "2015-10-15T23:52:18Z",
    "url": "/v2/jobs/90708923-37de-4b85-8c2a-4149609a68e5"
  },
  "entity": {
    "guid": "90708923-37de-4b85-8c2a-4149609a68e5",
    "status": "queued"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 0a020949-7e81-45a1-888d-300b9815fcb7
Content-Length: 270
X-Content-Type-Options: nosniff