Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Stage a package

POST /v3/packages/:guid/droplets

Request

Route

POST /v3/packages/guid-d3020468-b089-42b9-baf6-74bbadec0e25/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",
  "stack": "trusty64"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTgiLCJlbWFpbCI6ImVtYWlsLThAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQzMjc3NDk3OH0.PhwpNL0pEaOpXW8-whb7q2SgzB8ubCpjy4OjmoeL4GE
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/packages/guid-d3020468-b089-42b9-baf6-74bbadec0e25/droplets" -d '{
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack",
  "stack": "trusty64"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTgiLCJlbWFpbCI6ImVtYWlsLThAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQzMjc3NDk3OH0.PhwpNL0pEaOpXW8-whb7q2SgzB8ubCpjy4OjmoeL4GE" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "whatuuid",
  "state": "PENDING",
  "hash": null,
  "buildpack_git_url": "http://github.com/myorg/awesome-buildpack",
  "failure_reason": null,
  "detected_start_command": null,
  "procfile": null,
  "environment_variables": {
    "VCAP_APPLICATION": {
      "limits": {
        "mem": 1024,
        "disk": 4096,
        "fds": 16384
      },
      "application_version": "whatuuid",
      "application_name": "name-40",
      "application_uris": [

      ],
      "version": "whatuuid",
      "name": "name-40",
      "space_name": "name-37",
      "space_id": "f7c02498-42c8-4028-ac2f-e74bf38f06a8",
      "uris": [

      ],
      "users": null
    },
    "CF_STACK": "trusty64"
  },
  "created_at": "2015-05-21T01:02:58Z",
  "updated_at": null,
  "_links": {
    "self": {
      "href": "/v3/droplets/whatuuid"
    },
    "package": {
      "href": "/v3/packages/guid-d3020468-b089-42b9-baf6-74bbadec0e25"
    },
    "app": {
      "href": "/v3/apps/guid-9087056c-9045-4eb5-95fa-0e2357db3bc4"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: whatuuid
Content-Length: 1021
X-Content-Type-Options: nosniff