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.eyJ1c2VyX2lkIjoidWFhLWlkLTIwMyIsImVtYWlsIjoiZW1haWwtMTQ0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4NzR9.oDjECDOgFN4ZHWWZA-6DhzprZyxfdJpN67G1tTyfJb4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/buildpacks/ec058687-ff1b-4def-8710-cca5287d61f5

Body

{
  "enabled": false
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/ec058687-ff1b-4def-8710-cca5287d61f5" -d '{
  "enabled": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwMyIsImVtYWlsIjoiZW1haWwtMTQ0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4NzR9.oDjECDOgFN4ZHWWZA-6DhzprZyxfdJpN67G1tTyfJb4" \
	-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: 435c9a3c-c68b-4bc4-b156-d8f1842ff4df
Content-Length: 355
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "ec058687-ff1b-4def-8710-cca5287d61f5",
    "url": "/v2/buildpacks/ec058687-ff1b-4def-8710-cca5287d61f5",
    "created_at": "2015-01-27T19:14:34Z",
    "updated_at": "2015-01-27T19:14:34Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": false,
    "locked": false,
    "filename": "name-1338"
  }
}

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwMyIsImVtYWlsIjoiZW1haWwtMTQ0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4NzR9.oDjECDOgFN4ZHWWZA-6DhzprZyxfdJpN67G1tTyfJb4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/buildpacks/ec058687-ff1b-4def-8710-cca5287d61f5

Body

{
  "enabled": true
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/ec058687-ff1b-4def-8710-cca5287d61f5" -d '{
  "enabled": true
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwMyIsImVtYWlsIjoiZW1haWwtMTQ0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4NzR9.oDjECDOgFN4ZHWWZA-6DhzprZyxfdJpN67G1tTyfJb4" \
	-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: 1ec26533-5ade-4ae7-856d-0444f6b3d146
Content-Length: 354
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "ec058687-ff1b-4def-8710-cca5287d61f5",
    "url": "/v2/buildpacks/ec058687-ff1b-4def-8710-cca5287d61f5",
    "created_at": "2015-01-27T19:14:34Z",
    "updated_at": "2015-01-27T19:14:34Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": false,
    "filename": "name-1338"
  }
}