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

Route

PUT /v2/buildpacks/482fd333-9160-45d3-98e9-70b42041d609

Body

{
  "enabled": false
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/482fd333-9160-45d3-98e9-70b42041d609" -d '{
  "enabled": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxMSIsImVtYWlsIjoiZW1haWwtMjE0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE3MDJ9.WKeMf2aoLoxq9xS_HLjTuUsidvyKqW3yQVsDPC7_icc" \
	-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: c3376623-61f5-4c59-9666-b5d0e69cc358
Content-Length: 355
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "482fd333-9160-45d3-98e9-70b42041d609",
    "url": "/v2/buildpacks/482fd333-9160-45d3-98e9-70b42041d609",
    "created_at": "2015-02-13T22:35:02Z",
    "updated_at": "2015-02-13T22:35:02Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": false,
    "locked": false,
    "filename": "name-1638"
  }
}

Request

Headers

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

Route

PUT /v2/buildpacks/482fd333-9160-45d3-98e9-70b42041d609

Body

{
  "enabled": true
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/482fd333-9160-45d3-98e9-70b42041d609" -d '{
  "enabled": true
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxMSIsImVtYWlsIjoiZW1haWwtMjE0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE3MDJ9.WKeMf2aoLoxq9xS_HLjTuUsidvyKqW3yQVsDPC7_icc" \
	-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: 833d9d82-ec8e-4ad5-9b2a-2b4734ec9bf9
Content-Length: 354
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "482fd333-9160-45d3-98e9-70b42041d609",
    "url": "/v2/buildpacks/482fd333-9160-45d3-98e9-70b42041d609",
    "created_at": "2015-02-13T22:35:02Z",
    "updated_at": "2015-02-13T22:35:02Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": false,
    "filename": "name-1638"
  }
}