Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Copy a Package

POST /v3/apps/:guid/packages

Request

Route

POST /v3/apps/guid-ef1a80a1-1191-473a-b20a-c7616818add6/packages?source_package_guid=guid-99031503-6873-4b9b-bd75-136e5d18fe0f

Parameters

Name Description Valid Values Example Values
source_package_guid The package to copy from
source_package_guid: guid-99031503-6873-4b9b-bd75-136e5d18fe0f

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4NyIsImVtYWlsIjoiZW1haWwtMTIwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDUzNjIzMDN9.teSlHIPkOYLtG5-9ddAxVGv1idAChdeifITB32dWea0
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-ef1a80a1-1191-473a-b20a-c7616818add6/packages?source_package_guid=guid-99031503-6873-4b9b-bd75-136e5d18fe0f" -d '' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4NyIsImVtYWlsIjoiZW1haWwtMTIwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDUzNjIzMDN9.teSlHIPkOYLtG5-9ddAxVGv1idAChdeifITB32dWea0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "70f1824e-f1e6-4652-a635-fad7bc3dd2d0",
  "type": "url",
  "data": {
    "hash": {
      "type": "sha1",
      "value": null
    },
    "error": null
  },
  "url": "http://awesome-sauce.com",
  "state": "READY",
  "created_at": "2015-10-13T17:31:43Z",
  "updated_at": null,
  "links": {
    "self": {
      "href": "/v3/packages/70f1824e-f1e6-4652-a635-fad7bc3dd2d0"
    },
    "app": {
      "href": "/v3/apps/guid-ef1a80a1-1191-473a-b20a-c7616818add6"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: a99ccf56-b6f0-4393-a481-34ca711be4f3
Content-Length: 477
X-Content-Type-Options: nosniff