Home
Version 3
Buildpacks API

Buildpacks API

Enable or disable a Buildpack

PUT /v2/buildpacks/:guid

Request

Route

PUT /v2/buildpacks/7886309c-9e48-4703-80c2-979d3b1f9c07

Parameters

Name Description Valid Values Example Values
guid The guid of the Buildpack

Body

Name Description Default Valid Values Example Values
name The name of the buildpack. To be used by app buildpack field. (only alphanumeric characters)
  • Golang_buildpack
position The order in which the buildpacks are checked during buildpack auto-detection.
enabled Whether or not the buildpack will be used for staging true
locked Whether or not the buildpack is locked to prevent updates false
filename The name of the uploaded buildpack file
{
  "enabled": false
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5MSIsImVtYWlsIjoiZW1haWwtMjIyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDZ9.xGT4ubehd5G71wfEm940LOjkFe5CAwT-A19mJyvpc88
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/7886309c-9e48-4703-80c2-979d3b1f9c07" -d '{
  "enabled": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5MSIsImVtYWlsIjoiZW1haWwtMjIyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDZ9.xGT4ubehd5G71wfEm940LOjkFe5CAwT-A19mJyvpc88" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "7886309c-9e48-4703-80c2-979d3b1f9c07",
    "url": "/v2/buildpacks/7886309c-9e48-4703-80c2-979d3b1f9c07",
    "created_at": "2015-11-03T00:54:06Z",
    "updated_at": "2015-11-03T00:54:06Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": false,
    "locked": false,
    "filename": "name-1177"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 4d65b6d2-5978-4d70-bbe5-3a5c98fee1b1
Content-Length: 355
X-Content-Type-Options: nosniff

Request

Route

PUT /v2/buildpacks/7886309c-9e48-4703-80c2-979d3b1f9c07

Parameters

Name Description Valid Values Example Values
guid The guid of the Buildpack

Body

Name Description Default Valid Values Example Values
name The name of the buildpack. To be used by app buildpack field. (only alphanumeric characters)
  • Golang_buildpack
position The order in which the buildpacks are checked during buildpack auto-detection.
enabled Whether or not the buildpack will be used for staging true
locked Whether or not the buildpack is locked to prevent updates false
filename The name of the uploaded buildpack file
{
  "enabled": true
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5MSIsImVtYWlsIjoiZW1haWwtMjIyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDZ9.xGT4ubehd5G71wfEm940LOjkFe5CAwT-A19mJyvpc88
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/7886309c-9e48-4703-80c2-979d3b1f9c07" -d '{
  "enabled": true
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5MSIsImVtYWlsIjoiZW1haWwtMjIyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDZ9.xGT4ubehd5G71wfEm940LOjkFe5CAwT-A19mJyvpc88" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "7886309c-9e48-4703-80c2-979d3b1f9c07",
    "url": "/v2/buildpacks/7886309c-9e48-4703-80c2-979d3b1f9c07",
    "created_at": "2015-11-03T00:54:06Z",
    "updated_at": "2015-11-03T00:54:06Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": false,
    "filename": "name-1177"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 0240248d-2fea-485f-87e2-5c4b4915043b
Content-Length: 354
X-Content-Type-Options: nosniff