Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Copy a Package

POST /v3/apps/:guid/packages

Request

Route

POST /v3/apps/guid-f3782189-ac9b-442a-b770-ff76e78c8f30/packages?source_package_guid=guid-b637d733-1109-47eb-a740-7beb5d3693d6

Parameters

Name Description Valid Values Example Values
source_package_guid The package to copy from
source_package_guid: guid-b637d733-1109-47eb-a740-7beb5d3693d6

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5OCIsImVtYWlsIjoiZW1haWwtMjAxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NTh9.4bIpTHaTI0wFTIo7dhhvZ3NK4rjbiuDbeVtyMuOgFAc
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-f3782189-ac9b-442a-b770-ff76e78c8f30/packages?source_package_guid=guid-b637d733-1109-47eb-a740-7beb5d3693d6" -d '' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5OCIsImVtYWlsIjoiZW1haWwtMjAxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NTh9.4bIpTHaTI0wFTIo7dhhvZ3NK4rjbiuDbeVtyMuOgFAc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "809f9590-2eb1-410c-9da9-972dc7576149",
  "type": "url",
  "data": {
    "hash": {
      "type": "sha1",
      "value": null
    },
    "error": null
  },
  "url": "http://awesome-sauce.com",
  "state": "READY",
  "created_at": "2015-10-15T23:52:38Z",
  "updated_at": null,
  "links": {
    "self": {
      "href": "/v3/packages/809f9590-2eb1-410c-9da9-972dc7576149"
    },
    "app": {
      "href": "/v3/apps/guid-f3782189-ac9b-442a-b770-ff76e78c8f30"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 22ac9230-9170-40b7-856b-03767b51063e
Content-Length: 477
X-Content-Type-Options: nosniff