Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Copy a Package

POST /v3/apps/:guid/packages

Request

Route

POST /v3/apps/guid-2f76249a-1e73-44ca-b637-57fdaf85dfa9/packages?source_package_guid=guid-e05e9b8b-d585-4a23-8b98-c15d133ebf8a

Parameters

Name Description Valid Values Example Values
source_package_guid The package to copy from
source_package_guid: guid-e05e9b8b-d585-4a23-8b98-c15d133ebf8a

Headers

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

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-2f76249a-1e73-44ca-b637-57fdaf85dfa9/packages?source_package_guid=guid-e05e9b8b-d585-4a23-8b98-c15d133ebf8a" -d '' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3NCIsImVtYWlsIjoiZW1haWwtMTcxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQyNjA2NDd9.cYS4ShG0QIVsFijGHej1CyjkXMLJgpI9n8vy0weWFrc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "63500877-864f-43fb-860c-e9f704bf5925",
  "type": "url",
  "hash": {
    "type": "sha1",
    "value": null
  },
  "url": "http://awesome-sauce.com",
  "state": "READY",
  "error": null,
  "created_at": "2015-09-30T23:30:47Z",
  "updated_at": null,
  "links": {
    "self": {
      "href": "/v3/packages/63500877-864f-43fb-860c-e9f704bf5925"
    },
    "app": {
      "href": "/v3/apps/guid-2f76249a-1e73-44ca-b637-57fdaf85dfa9"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: dd011102-8c68-40d3-b040-43ab6aef1d75
Content-Length: 451
X-Content-Type-Options: nosniff