Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Copy a Package

POST /v3/apps/:guid/packages

Request

Route

POST /v3/apps/guid-6f31c94a-b291-457f-9bbe-538ecdb6c17b/packages?source_package_guid=guid-4e38901f-2b76-4880-b6f4-8ee42cc8faa4

Parameters

Name Description Valid Values Example Values
source_package_guid The package to copy from
source_package_guid: guid-4e38901f-2b76-4880-b6f4-8ee42cc8faa4

Headers

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

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-6f31c94a-b291-457f-9bbe-538ecdb6c17b/packages?source_package_guid=guid-4e38901f-2b76-4880-b6f4-8ee42cc8faa4" -d '' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxIiwiZW1haWwiOiJlbWFpbC0zMUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU4NTk5NDIzfQ.wamdpo5HZgALKacscZkJr_styJkwnKjEUsvLa8ZULNw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "ac46e056-4af7-4317-ac6b-b966cdd0c34d",
  "type": "docker",
  "data": {
    "image": "http://awesome-sauce.com"
  },
  "state": "READY",
  "created_at": "2016-03-14T22:30:23Z",
  "updated_at": null,
  "links": {
    "self": {
      "href": "/v3/packages/ac46e056-4af7-4317-ac6b-b966cdd0c34d"
    },
    "stage": {
      "href": "/v3/packages/ac46e056-4af7-4317-ac6b-b966cdd0c34d/droplets",
      "method": "POST"
    },
    "app": {
      "href": "/v3/apps/guid-6f31c94a-b291-457f-9bbe-538ecdb6c17b"
    }
  }
}

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
X-Runtime: 0.049215
Content-Length: 523