Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Stage a package

POST /v3/packages/:guid/droplets

Request

Route

POST /v3/packages/guid-fcfed720-cd01-4830-af17-d99ccc7f6106/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.eyJ1c2VyX2lkIjoidWFhLWlkLTE3MSIsImVtYWlsIjoiZW1haWwtMTIyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2NjZ9.Pg6I-DS-xB2GbUjTOgjLGV6R2tVmbPtx0F15ZD_1mN8
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/packages/guid-fcfed720-cd01-4830-af17-d99ccc7f6106/droplets" -d '{
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3MSIsImVtYWlsIjoiZW1haWwtMTIyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2NjZ9.Pg6I-DS-xB2GbUjTOgjLGV6R2tVmbPtx0F15ZD_1mN8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "5ea025a2-65a7-4d2d-ba6f-3b8f110d42b7",
  "state": "PENDING",
  "hash": null,
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack",
  "failure_reason": null,
  "detected_start_command": null,
  "created_at": "2015-03-03T00:51:06Z",
  "_links": {
    "self": {
      "href": "/v3/droplets/5ea025a2-65a7-4d2d-ba6f-3b8f110d42b7"
    },
    "package": {
      "href": "/v3/packages/guid-fcfed720-cd01-4830-af17-d99ccc7f6106"
    },
    "app": {
      "href": "/v3/apps/guid-5a353aed-842e-4ff2-ba40-af00b2c6d7e3"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 485e2a47-f2fa-490b-a1b9-089375d40669
Content-Length: 545
X-Content-Type-Options: nosniff