Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Copy a Package

POST /v3/apps/:guid/packages

Request

Route

POST /v3/apps/guid-192ebb06-c385-445f-9356-844746c43c0b/packages?source_package_guid=guid-e1ab64a2-218e-4758-8ae8-7552ccb29c22

Parameters

Name Description Valid Values Example Values
source_package_guid The package to copy from
source_package_guid: guid-e1ab64a2-218e-4758-8ae8-7552ccb29c22

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxIiwiZW1haWwiOiJlbWFpbC0yMEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU2NDUyMjIxfQ.rrsfTE9tAg1nu8Yb_Olqw6GbgW539czPJlcz-g9gPtE
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-192ebb06-c385-445f-9356-844746c43c0b/packages?source_package_guid=guid-e1ab64a2-218e-4758-8ae8-7552ccb29c22" -d '' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxIiwiZW1haWwiOiJlbWFpbC0yMEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDU2NDUyMjIxfQ.rrsfTE9tAg1nu8Yb_Olqw6GbgW539czPJlcz-g9gPtE" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "128c8338-5047-4261-82cb-aaf45feabb27",
  "type": "docker",
  "data": {
    "image": "http://awesome-sauce.com"
  },
  "state": "READY",
  "created_at": "2016-02-19T02:03:41Z",
  "updated_at": null,
  "links": {
    "self": {
      "href": "/v3/packages/128c8338-5047-4261-82cb-aaf45feabb27"
    },
    "stage": {
      "href": "/v3/packages/128c8338-5047-4261-82cb-aaf45feabb27/droplets",
      "method": "POST"
    },
    "app": {
      "href": "/v3/apps/guid-192ebb06-c385-445f-9356-844746c43c0b"
    }
  }
}

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.020880
Content-Length: 523