Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Copy a Package

POST /v3/apps/:guid/packages

Request

Route

POST /v3/apps/guid-f624597f-0daf-4483-9230-bf55eb08aca2/packages?source_package_guid=guid-34b58b86-16bd-452c-b89b-8b773c4fbb92

Parameters

Name Description Valid Values Example Values
source_package_guid The package to copy from
source_package_guid: guid-34b58b86-16bd-452c-b89b-8b773c4fbb92

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4NSIsImVtYWlsIjoiZW1haWwtMjU2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTMzMTA5OTB9.oO8Habe2l-l7_sRa9x-Z-o9wIrjtq2dxBlTVsrJjuWA
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-f624597f-0daf-4483-9230-bf55eb08aca2/packages?source_package_guid=guid-34b58b86-16bd-452c-b89b-8b773c4fbb92" -d '' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4NSIsImVtYWlsIjoiZW1haWwtMjU2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTMzMTA5OTB9.oO8Habe2l-l7_sRa9x-Z-o9wIrjtq2dxBlTVsrJjuWA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "579d2cec-3c70-4d70-a493-7920f4c36355",
  "type": "docker",
  "data": {
    "image": "http://awesome-sauce.com"
  },
  "state": "READY",
  "created_at": "2016-01-13T17:29:50Z",
  "updated_at": null,
  "links": {
    "self": {
      "href": "/v3/packages/579d2cec-3c70-4d70-a493-7920f4c36355"
    },
    "stage": {
      "href": "/v3/packages/579d2cec-3c70-4d70-a493-7920f4c36355/droplets",
      "method": "POST"
    },
    "app": {
      "href": "/v3/apps/guid-f624597f-0daf-4483-9230-bf55eb08aca2"
    }
  }
}

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