Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Copy a Package

POST /v3/apps/:guid/packages

Request

Route

POST /v3/apps/guid-b71a86bd-cf0a-4045-af74-0f696c69d145/packages?source_package_guid=guid-c653f492-b45c-4395-b7b0-3d424969db2d

Parameters

Name Description Valid Values Example Values
source_package_guid The package to copy from
source_package_guid: guid-c653f492-b45c-4395-b7b0-3d424969db2d

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MCIsImVtYWlsIjoiZW1haWwtMTM2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MDR9.1X_qC1QtWk85oOuL8El3U9fSk3lCWA__RgBAg2D4-RY
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-b71a86bd-cf0a-4045-af74-0f696c69d145/packages?source_package_guid=guid-c653f492-b45c-4395-b7b0-3d424969db2d" -d '' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5MCIsImVtYWlsIjoiZW1haWwtMTM2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MDR9.1X_qC1QtWk85oOuL8El3U9fSk3lCWA__RgBAg2D4-RY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "9d085037-f840-4e18-8d9b-9016ea566244",
  "type": "url",
  "hash": {
    "type": "sha1",
    "value": null
  },
  "url": "http://awesome-sauce.com",
  "state": "READY",
  "error": null,
  "created_at": "2015-08-31T21:50:04Z",
  "updated_at": null,
  "_links": {
    "self": {
      "href": "/v3/packages/9d085037-f840-4e18-8d9b-9016ea566244"
    },
    "app": {
      "href": "/v3/apps/guid-b71a86bd-cf0a-4045-af74-0f696c69d145"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 3b146aee-b0b0-4841-a78d-9f96e8826c31
Content-Length: 452
X-Content-Type-Options: nosniff