Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Copy a Package

POST /v3/apps/:guid/packages

Request

Route

POST /v3/apps/guid-3ed4e0bf-e199-4da3-8a56-5ffb70c850fd/packages?source_package_guid=guid-2b69c4e8-d669-426b-91f8-39328facca44

Parameters

Name Description Valid Values Example Values
source_package_guid The package to copy from
source_package_guid: guid-2b69c4e8-d669-426b-91f8-39328facca44

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTgzIiwiZW1haWwiOiJlbWFpbC04MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ3MTE2ODM0fQ.hY1S5RzBH1IzfwsfxzdQ1KePN3rTXgWi05H-QApotVA
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-3ed4e0bf-e199-4da3-8a56-5ffb70c850fd/packages?source_package_guid=guid-2b69c4e8-d669-426b-91f8-39328facca44" -d '' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTgzIiwiZW1haWwiOiJlbWFpbC04MUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ3MTE2ODM0fQ.hY1S5RzBH1IzfwsfxzdQ1KePN3rTXgWi05H-QApotVA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "af9e6c3a-0eff-4ff7-aa54-fd336a02cd18",
  "type": "docker",
  "data": {
    "hash": {
      "type": "sha1",
      "value": null
    },
    "error": null,
    "image": "http://awesome-sauce.com",
    "credentials": {

    },
    "store_image": false
  },
  "state": "READY",
  "created_at": "2015-11-03T00:53:54Z",
  "updated_at": null,
  "links": {
    "self": {
      "href": "/v3/packages/af9e6c3a-0eff-4ff7-aa54-fd336a02cd18"
    },
    "app": {
      "href": "/v3/apps/guid-3ed4e0bf-e199-4da3-8a56-5ffb70c850fd"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f8825604-2032-436f-b994-ccb7e332440d
Content-Length: 539
X-Content-Type-Options: nosniff