Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Stage a package

POST /v3/packages/:guid/droplets

Request

Route

POST /v3/packages/guid-fb442b0d-eec3-49fc-b6b7-9301fa4c2ab4/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.eyJ1c2VyX2lkIjoidWFhLWlkLTU0IiwiZW1haWwiOiJlbWFpbC01MkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI2NjMzODk3fQ.FbvItilJ1LZFlhKmP6--7GYd02Rdx21XRxvfWpkcGXk
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/packages/guid-fb442b0d-eec3-49fc-b6b7-9301fa4c2ab4/droplets" -d '{
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTU0IiwiZW1haWwiOiJlbWFpbC01MkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIucmVhZCIsImNsb3VkX2NvbnRyb2xsZXIud3JpdGUiXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI2NjMzODk3fQ.FbvItilJ1LZFlhKmP6--7GYd02Rdx21XRxvfWpkcGXk" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "caddb004-56e3-49fa-b0f0-96c64037811d",
  "state": "PENDING",
  "hash": null,
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack",
  "failure_reason": null,
  "detected_start_command": null,
  "created_at": "2015-03-10T23:11:37Z",
  "_links": {
    "self": {
      "href": "/v3/droplets/caddb004-56e3-49fa-b0f0-96c64037811d"
    },
    "package": {
      "href": "/v3/packages/guid-fb442b0d-eec3-49fc-b6b7-9301fa4c2ab4"
    },
    "app": {
      "href": "/v3/apps/guid-8ea3ebe3-58b3-4abf-a547-db3bae7fa407"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: bd4c00d2-2d89-42af-b37c-cde31cd9de8c
Content-Length: 545
X-Content-Type-Options: nosniff