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.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NiIsImVtYWlsIjoiZW1haWwtMTc4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE2OTl9.7sq7BDxnl3TsrHvA1mC8UWTzvdkPps95TM_DAzN6Eqg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v3/packages/guid-44618172-6d0b-4145-977a-b3e27089a502/droplets

Body

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

cURL

curl "https://api.[your-domain.com]/v3/packages/guid-44618172-6d0b-4145-977a-b3e27089a502/droplets" -d '{
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NiIsImVtYWlsIjoiZW1haWwtMTc4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE2OTl9.7sq7BDxnl3TsrHvA1mC8UWTzvdkPps95TM_DAzN6Eqg" \
	-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: 5b777edf-cbbf-4dbe-aed4-f71950654965
Content-Length: 458
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "guid": "256bc68a-2c4d-409c-8eb9-e1f4a1121122",
  "state": "PENDING",
  "hash": null,
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack",
  "failure_reason": null,
  "detected_start_command": null,
  "created_at": "2015-02-13T22:34:59Z",
  "_links": {
    "self": {
      "href": "/v3/droplets/256bc68a-2c4d-409c-8eb9-e1f4a1121122"
    },
    "package": {
      "href": "/v3/packages/guid-44618172-6d0b-4145-977a-b3e27089a502"
    }
  }
}