Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Stage a package

POST /v3/packages/:guid/droplets

Request

Route

POST /v3/packages/guid-cfa0eb73-54ec-4d25-b9da-a56becbadfdc/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 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.eyJ1c2VyX2lkIjoidWFhLWlkLTE0NyIsImVtYWlsIjoiZW1haWwtODVAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1MTQxMzY4Mn0.oxE88lDnPPfspBKYa9ty2a__eE5Y9FuNaLgz3Kx4mrQ
Content-Type: application/json
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/packages/guid-cfa0eb73-54ec-4d25-b9da-a56becbadfdc/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.eyJ1c2VyX2lkIjoidWFhLWlkLTE0NyIsImVtYWlsIjoiZW1haWwtODVAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1MTQxMzY4Mn0.oxE88lDnPPfspBKYa9ty2a__eE5Y9FuNaLgz3Kx4mrQ" \
	-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-a135c4ea-edda-40d0-b9e7-aa1a414393f7",
      "application_version": "whatuuid",
      "application_name": "name-481",
      "application_uris": [

      ],
      "version": "whatuuid",
      "name": "name-481",
      "space_name": "name-478",
      "space_id": "2eea3569-97da-4855-aa4d-1e0bc9bbfd3f",
      "uris": [

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

    }
  },
  "created_at": "2015-12-22T18:28:02Z",
  "updated_at": null,
  "links": {
    "self": {
      "href": "/v3/droplets/whatuuid"
    },
    "package": {
      "href": "/v3/packages/guid-cfa0eb73-54ec-4d25-b9da-a56becbadfdc"
    },
    "app": {
      "href": "/v3/apps/guid-a135c4ea-edda-40d0-b9e7-aa1a414393f7"
    },
    "assign_current_droplet": {
      "href": "/v3/apps/guid-a135c4ea-edda-40d0-b9e7-aa1a414393f7/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.059974
Content-Length: 1403