Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Stage a package

POST /v3/packages/:guid/droplets

Request

Route

POST /v3/packages/guid-dc837377-742d-4867-9b34-4d6ebc3f754d/droplets

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

Body

Name Description Default Valid Values Example Values
{
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack"
}

Headers

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

cURL

curl "https://api.[your-domain.com]/v3/packages/guid-dc837377-742d-4867-9b34-4d6ebc3f754d/droplets" -d '{
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxMCIsImVtYWlsIjoiZW1haWwtMTYyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjYxODc3NDh9.XjnvXnXLlC8yppdyULtYUDLwzCfHyG0DgNvg_Bq1uyQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "4f4ec5aa-602d-426f-8d5b-850bafaf278b",
  "state": "PENDING",
  "hash": null,
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack",
  "failure_reason": null,
  "detected_start_command": null,
  "created_at": "2015-03-05T19:15:48Z",
  "_links": {
    "self": {
      "href": "/v3/droplets/4f4ec5aa-602d-426f-8d5b-850bafaf278b"
    },
    "package": {
      "href": "/v3/packages/guid-dc837377-742d-4867-9b34-4d6ebc3f754d"
    },
    "app": {
      "href": "/v3/apps/guid-e9a4ad13-b547-45aa-8ac1-992fcceb7ee2"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: e28c206e-0bef-4e67-b5e3-ac4a0f186b7c
Content-Length: 545
X-Content-Type-Options: nosniff