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

Route

POST /v3/packages/guid-d2750e57-0e36-4839-99e1-d9f7364757a1/droplets

Body

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

cURL

curl "https://api.[your-domain.com]/v3/packages/guid-d2750e57-0e36-4839-99e1-d9f7364757a1/droplets" -d '{
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NyIsImVtYWlsIjoiZW1haWwtMTg3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQzMTAxMzV9.tcpnyDsFdybK9Evm3vam6qfc82Mxk0lya59WKdlWmho" \
	-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: 12ecae8f-4411-4a12-8240-e0eb8673e8e2
Content-Length: 458
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "guid": "af46d6a7-4b06-4271-be03-73bcbdc6282f",
  "state": "PENDING",
  "hash": null,
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack",
  "failure_reason": null,
  "detected_start_command": null,
  "created_at": "2015-02-12T01:42:15Z",
  "_links": {
    "self": {
      "href": "/v3/droplets/af46d6a7-4b06-4271-be03-73bcbdc6282f"
    },
    "package": {
      "href": "/v3/packages/guid-d2750e57-0e36-4839-99e1-d9f7364757a1"
    }
  }
}