Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Stage a package

POST /v3/packages/:guid/droplets

Request

Route

POST /v3/packages/guid-728ed464-4f41-4c2c-a7a6-06be2ef99ee5/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.eyJ1c2VyX2lkIjoidWFhLWlkLTMiLCJlbWFpbCI6ImVtYWlsLTNAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNzQ4MDgzOX0.3SX0AsIb_sqI8grmnTER6DG84xCaIDk6YVNOqIHP6fM
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/packages/guid-728ed464-4f41-4c2c-a7a6-06be2ef99ee5/droplets" -d '{
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMiLCJlbWFpbCI6ImVtYWlsLTNAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNzQ4MDgzOX0.3SX0AsIb_sqI8grmnTER6DG84xCaIDk6YVNOqIHP6fM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "52a4d326-eb9a-4cda-bdc1-73672b7a724f",
  "state": "PENDING",
  "hash": null,
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack",
  "failure_reason": null,
  "detected_start_command": null,
  "created_at": "2015-03-20T18:27:19Z",
  "_links": {
    "self": {
      "href": "/v3/droplets/52a4d326-eb9a-4cda-bdc1-73672b7a724f"
    },
    "package": {
      "href": "/v3/packages/guid-728ed464-4f41-4c2c-a7a6-06be2ef99ee5"
    },
    "app": {
      "href": "/v3/apps/guid-d8cc0caf-b38d-485e-9675-18f37e4668c2"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: b7d1a885-11a9-468c-b60b-b1dae83fadd9
Content-Length: 545
X-Content-Type-Options: nosniff