Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Stage a package

POST /v3/packages/:guid/droplets

Request

Route

POST /v3/packages/guid-fd72736a-a6bd-441b-a7f4-5f84befcdf12/droplets

Body

Name Description Default Valid Values Example Values
buildpack Buildpack to be used when staging the package. Note: If this parameter is not provided, then the buildpack associated with your app will be used as a default
  • buildpack name
  • git url
  • ruby_buildpack
  • https://github.com/cloudfoundry/ruby-buildpack
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
{
  "buildpack": "http://github.com/myorg/awesome-buildpack",
  "stack": "cflinuxfs2"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwMyIsImVtYWlsIjoiZW1haWwtMjk1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk4MDB9.Ly3jlAMAArUP_g8uJ-9VFha86Rmu71Q-F-ZDCw0G7ts
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/packages/guid-fd72736a-a6bd-441b-a7f4-5f84befcdf12/droplets" -d '{
  "buildpack": "http://github.com/myorg/awesome-buildpack",
  "stack": "cflinuxfs2"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwMyIsImVtYWlsIjoiZW1haWwtMjk1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk4MDB9.Ly3jlAMAArUP_g8uJ-9VFha86Rmu71Q-F-ZDCw0G7ts" \
	-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": "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_id": "guid-72f67ced-e89e-412a-ae1f-cb40d02afe32",
      "application_version": "whatuuid",
      "application_name": "name-2265",
      "application_uris": [

      ],
      "version": "whatuuid",
      "name": "name-2265",
      "space_name": "name-2262",
      "space_id": "d9d5073e-ffb7-4e9b-aa16-a7ac0ad6ab38",
      "uris": [

      ],
      "users": null
    },
    "CF_STACK": "cflinuxfs2"
  },
  "created_at": "2015-07-06T23:23:20Z",
  "updated_at": null,
  "_links": {
    "self": {
      "href": "/v3/droplets/whatuuid"
    },
    "package": {
      "href": "/v3/packages/guid-fd72736a-a6bd-441b-a7f4-5f84befcdf12"
    },
    "app": {
      "href": "/v3/apps/guid-72f67ced-e89e-412a-ae1f-cb40d02afe32"
    }
  }
}

Headers

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