Home
Version 3
Buildpacks API

Buildpacks API

Enable or disable a Buildpack

PUT /v2/buildpacks/:guid

Fields

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

Parameters

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

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1NiIsImVtYWlsIjoiZW1haWwtMTA4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczNjd9.PGrOwyuwp7yV0WOajJa3gqIJE8_AUkMc3lHgCjNi9b8
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/buildpacks/096dd01d-94d2-48e9-bfe2-8179a2df2125

Body

{
  "enabled": false
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/096dd01d-94d2-48e9-bfe2-8179a2df2125" -d '{
  "enabled": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1NiIsImVtYWlsIjoiZW1haWwtMTA4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczNjd9.PGrOwyuwp7yV0WOajJa3gqIJE8_AUkMc3lHgCjNi9b8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 2a673423-d57b-459e-8412-586f921a46b9
Content-Length: 354
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "096dd01d-94d2-48e9-bfe2-8179a2df2125",
    "url": "/v2/buildpacks/096dd01d-94d2-48e9-bfe2-8179a2df2125",
    "created_at": "2015-02-10T01:42:47Z",
    "updated_at": "2015-02-10T01:42:47Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": false,
    "locked": false,
    "filename": "name-387"
  }
}

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1NiIsImVtYWlsIjoiZW1haWwtMTA4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczNjd9.PGrOwyuwp7yV0WOajJa3gqIJE8_AUkMc3lHgCjNi9b8
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/buildpacks/096dd01d-94d2-48e9-bfe2-8179a2df2125

Body

{
  "enabled": true
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/096dd01d-94d2-48e9-bfe2-8179a2df2125" -d '{
  "enabled": true
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1NiIsImVtYWlsIjoiZW1haWwtMTA4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczNjd9.PGrOwyuwp7yV0WOajJa3gqIJE8_AUkMc3lHgCjNi9b8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 2390f0e7-895b-46a8-8bea-8e3675bada13
Content-Length: 353
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "096dd01d-94d2-48e9-bfe2-8179a2df2125",
    "url": "/v2/buildpacks/096dd01d-94d2-48e9-bfe2-8179a2df2125",
    "created_at": "2015-02-10T01:42:47Z",
    "updated_at": "2015-02-10T01:42:47Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": false,
    "filename": "name-387"
  }
}