Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Stage a package

POST /v3/packages/:guid/droplets

Fields

Name Description Default Valid Values Example Values

Parameters

Name Description Valid Values Example Values
buildpack_guid Admin buildpack used to stage the package (cannot be used with buildpack_git_url)
buildpack_git_url Git url of a buildpack used to stage the package (cannot be used with buildpack_guid)
staging_environment_variables Environment variables to use during staging
stack Stack used to stage package
memory_limit Memory limit used to stage package
disk_limit Disk limit used to stage package

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwMCIsImVtYWlsIjoiZW1haWwtMjAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczNzN9.SkcYEe-EOAFRK01ZIw52-6J92Z2d6uRDM1-slnRi-po
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v3/packages/guid-aff4ea17-0c78-471c-92de-3b3f9bd709e9/droplets

Body

{
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack"
}

cURL

curl "https://api.[your-domain.com]/v3/packages/guid-aff4ea17-0c78-471c-92de-3b3f9bd709e9/droplets" -d '{
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwMCIsImVtYWlsIjoiZW1haWwtMjAzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczNzN9.SkcYEe-EOAFRK01ZIw52-6J92Z2d6uRDM1-slnRi-po" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 81738ad6-63ec-4b73-a58f-31e20f4696a3
Content-Length: 398
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "guid": "6a4798bf-cf5e-4c5c-91b2-aacfbb593aea",
  "state": "PENDING",
  "hash": null,
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack",
  "created_at": "2015-02-10T01:42:53Z",
  "_links": {
    "self": {
      "href": "/v3/droplets/6a4798bf-cf5e-4c5c-91b2-aacfbb593aea"
    },
    "package": {
      "href": "/v3/packages/guid-aff4ea17-0c78-471c-92de-3b3f9bd709e9"
    }
  }
}