Home
Version 3
Droplets (Experimental) API

Droplets (Experimental) API

Stage a package

POST /v3/packages/:guid/droplets

Request

Route

POST /v3/packages/guid-bdb9450a-25c2-4e1e-ab2b-58552be010f6/droplets

Body

Name Description Default Valid Values Example Values
environment_variables Environment variables to use during staging. Environment variable names may not start with "VCAP_" or "CF_". "PORT" is not a valid environment variable.
  • object
  • {"FEATURE_ENABLED": "true"}
memory_limit Memory limit used to stage package
  • integer
disk_limit Disk limit used to stage package
  • integer
lifecycle Lifecycle information for a droplet. If not provided, it will default to what is specified on the app. If the app does not have lifecycle information, it will default to a buildpack
  • object
  • { "type": "buildpack", "data": { "buildpack": "http://github.com/myorg/awesome-buildpack", "stack": "cflinuxfs2" } }
  • { "type": "docker" }
{
  "environment_variables": {
    "CUSTOM_ENV_VAR": "hello"
  },
  "lifecycle": {
    "type": "buildpack",
    "data": {
      "buildpack": "http://github.com/myorg/awesome-buildpack",
      "stack": "cflinuxfs2"
    }
  }
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ1MiIsImVtYWlsIjoiZW1haWwtMzIwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2OTJ9.oez3V9QOiBJqnhGBiCnwjFmxEPd3G5PUgqxU9UZ54T0
Content-Type: application/json
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/packages/guid-bdb9450a-25c2-4e1e-ab2b-58552be010f6/droplets" -d '{
  "environment_variables": {
    "CUSTOM_ENV_VAR": "hello"
  },
  "lifecycle": {
    "type": "buildpack",
    "data": {
      "buildpack": "http://github.com/myorg/awesome-buildpack",
      "stack": "cflinuxfs2"
    }
  }
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ1MiIsImVtYWlsIjoiZW1haWwtMzIwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg4NTU2OTJ9.oez3V9QOiBJqnhGBiCnwjFmxEPd3G5PUgqxU9UZ54T0" \
	-H "Content-Type: application/json" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "whatuuid",
  "state": "PENDING",
  "error": null,
  "lifecycle": {
    "type": "buildpack",
    "data": {
      "buildpack": "http://github.com/myorg/awesome-buildpack",
      "stack": "cflinuxfs2"
    }
  },
  "memory_limit": 1024,
  "disk_limit": 4096,
  "result": null,
  "environment_variables": {
    "CUSTOM_ENV_VAR": "hello",
    "CF_STACK": "cflinuxfs2",
    "VCAP_APPLICATION": {
      "limits": {
        "mem": 1024,
        "disk": 4096,
        "fds": 16384
      },
      "application_id": "guid-35a397f0-b347-4575-8e33-b056cdee9628",
      "application_version": "whatuuid",
      "application_name": "name-2535",
      "application_uris": [

      ],
      "version": "whatuuid",
      "name": "name-2535",
      "space_name": "name-2532",
      "space_id": "1ec84aed-5852-4b44-9ae5-7a1045cc65b8",
      "uris": [

      ],
      "users": null
    },
    "MEMORY_LIMIT": 1024,
    "VCAP_SERVICES": {

    }
  },
  "created_at": "2016-03-17T21:41:32Z",
  "updated_at": null,
  "links": {
    "self": {
      "href": "/v3/droplets/whatuuid"
    },
    "package": {
      "href": "/v3/packages/guid-bdb9450a-25c2-4e1e-ab2b-58552be010f6"
    },
    "app": {
      "href": "/v3/apps/guid-35a397f0-b347-4575-8e33-b056cdee9628"
    },
    "assign_current_droplet": {
      "href": "/v3/apps/guid-35a397f0-b347-4575-8e33-b056cdee9628/current_droplet",
      "method": "PUT"
    }
  }
}

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
X-Runtime: 0.048381
Content-Length: 1406