Home
Version 3
Buildpacks API

Buildpacks API

Enable or disable a Buildpack

PUT /v2/buildpacks/:guid

Request

Route

PUT /v2/buildpacks/3e4629c6-9826-4970-a7bf-ea9b01e295b7

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

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/3e4629c6-9826-4970-a7bf-ea9b01e295b7" -d '{
  "enabled": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ0MSIsImVtYWlsIjoiZW1haWwtMzA5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDd9.oXJJhjyLVMexkSaJx2tu1aPoj2e1oglvDC6jfnrK4jI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "3e4629c6-9826-4970-a7bf-ea9b01e295b7",
    "url": "/v2/buildpacks/3e4629c6-9826-4970-a7bf-ea9b01e295b7",
    "created_at": "2015-10-07T00:35:47Z",
    "updated_at": "2015-10-07T00:35:47Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": false,
    "locked": false,
    "filename": "name-2391"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: eed777a3-f164-4ecc-95a4-b743d183f436
Content-Length: 355
X-Content-Type-Options: nosniff

Request

Route

PUT /v2/buildpacks/3e4629c6-9826-4970-a7bf-ea9b01e295b7

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

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/3e4629c6-9826-4970-a7bf-ea9b01e295b7" -d '{
  "enabled": true
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ0MSIsImVtYWlsIjoiZW1haWwtMzA5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDd9.oXJJhjyLVMexkSaJx2tu1aPoj2e1oglvDC6jfnrK4jI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "3e4629c6-9826-4970-a7bf-ea9b01e295b7",
    "url": "/v2/buildpacks/3e4629c6-9826-4970-a7bf-ea9b01e295b7",
    "created_at": "2015-10-07T00:35:47Z",
    "updated_at": "2015-10-07T00:35:47Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": false,
    "filename": "name-2391"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 2427f3a0-8cc2-412a-983c-4ca80a727b86
Content-Length: 354
X-Content-Type-Options: nosniff