Home
Version 3
Buildpacks API

Buildpacks API

Enable or disable a Buildpack

PUT /v2/buildpacks/:guid

Request

Route

PUT /v2/buildpacks/cf490012-3762-48bb-b4de-bc523e3aaaac

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.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NiIsImVtYWlsIjoiZW1haWwtMjMyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzI3NzQ5OTZ9.ClNRIAECJd34Aminh1CcQGV4x7xeOpUa8dwqO2ZzdD0
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/cf490012-3762-48bb-b4de-bc523e3aaaac" -d '{
  "enabled": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NiIsImVtYWlsIjoiZW1haWwtMjMyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzI3NzQ5OTZ9.ClNRIAECJd34Aminh1CcQGV4x7xeOpUa8dwqO2ZzdD0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "cf490012-3762-48bb-b4de-bc523e3aaaac",
    "url": "/v2/buildpacks/cf490012-3762-48bb-b4de-bc523e3aaaac",
    "created_at": "2015-05-21T01:03:16Z",
    "updated_at": "2015-05-21T01:03:16Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": false,
    "locked": false,
    "filename": "name-1973"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 4951dc57-c6cd-452d-9399-47224e96d8d9
Content-Length: 355
X-Content-Type-Options: nosniff

Request

Route

PUT /v2/buildpacks/cf490012-3762-48bb-b4de-bc523e3aaaac

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.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NiIsImVtYWlsIjoiZW1haWwtMjMyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzI3NzQ5OTZ9.ClNRIAECJd34Aminh1CcQGV4x7xeOpUa8dwqO2ZzdD0
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/cf490012-3762-48bb-b4de-bc523e3aaaac" -d '{
  "enabled": true
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NiIsImVtYWlsIjoiZW1haWwtMjMyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzI3NzQ5OTZ9.ClNRIAECJd34Aminh1CcQGV4x7xeOpUa8dwqO2ZzdD0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "cf490012-3762-48bb-b4de-bc523e3aaaac",
    "url": "/v2/buildpacks/cf490012-3762-48bb-b4de-bc523e3aaaac",
    "created_at": "2015-05-21T01:03:16Z",
    "updated_at": "2015-05-21T01:03:16Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": false,
    "filename": "name-1973"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: e2770a53-d9be-493b-8ee3-db16fa9dfdf0
Content-Length: 354
X-Content-Type-Options: nosniff