Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Copy a Package

POST /v3/apps/:guid/packages

Request

Route

POST /v3/apps/guid-c0686692-28dd-4833-977e-433ca2e96887/packages?source_package_guid=guid-193a6231-29d0-4320-bb01-a6c0c38a2908

Parameters

Name Description Valid Values Example Values
source_package_guid The package to copy from
source_package_guid: guid-193a6231-29d0-4320-bb01-a6c0c38a2908

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE0NiIsImVtYWlsIjoiZW1haWwtODRAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1MTQxMzY4Mn0.CNz8B86fUWKJ5-PLPr9SdT4WGiksz1iRvzfWX025Ph0
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-c0686692-28dd-4833-977e-433ca2e96887/packages?source_package_guid=guid-193a6231-29d0-4320-bb01-a6c0c38a2908" -d '' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE0NiIsImVtYWlsIjoiZW1haWwtODRAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1MTQxMzY4Mn0.CNz8B86fUWKJ5-PLPr9SdT4WGiksz1iRvzfWX025Ph0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "f1d6d3c1-3880-439e-9bcc-00e802af4790",
  "type": "docker",
  "data": {
    "image": "http://awesome-sauce.com"
  },
  "state": "READY",
  "created_at": "2015-12-22T18:28:02Z",
  "updated_at": null,
  "links": {
    "self": {
      "href": "/v3/packages/f1d6d3c1-3880-439e-9bcc-00e802af4790"
    },
    "app": {
      "href": "/v3/apps/guid-c0686692-28dd-4833-977e-433ca2e96887"
    }
  }
}

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.028764
Content-Length: 402