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

Route

PUT /v2/buildpacks/fcaea963-ec83-4af4-ae73-5be805ee5429

Body

{
  "enabled": false
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/fcaea963-ec83-4af4-ae73-5be805ee5429" -d '{
  "enabled": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk0IiwiZW1haWwiOiJlbWFpbC04NkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE3NDYyMzU3fQ.rQTpdtAFIEBEq9kufoW1fo3AonyLNv4UnB_8R2X8-A8" \
	-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: 77679120-581e-4b80-b523-7e7d0ac75abb
Content-Length: 364
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "fcaea963-ec83-4af4-ae73-5be805ee5429",
    "url": "/v2/buildpacks/fcaea963-ec83-4af4-ae73-5be805ee5429",
    "created_at": "2014-11-24T19:32:37+00:00",
    "updated_at": "2014-11-24T19:32:37+00:00"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": false,
    "locked": false,
    "filename": "name-483"
  }
}

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk0IiwiZW1haWwiOiJlbWFpbC04NkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE3NDYyMzU3fQ.rQTpdtAFIEBEq9kufoW1fo3AonyLNv4UnB_8R2X8-A8
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/buildpacks/fcaea963-ec83-4af4-ae73-5be805ee5429

Body

{
  "enabled": true
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/fcaea963-ec83-4af4-ae73-5be805ee5429" -d '{
  "enabled": true
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk0IiwiZW1haWwiOiJlbWFpbC04NkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE3NDYyMzU3fQ.rQTpdtAFIEBEq9kufoW1fo3AonyLNv4UnB_8R2X8-A8" \
	-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: 88719d4c-c4d6-403a-a139-152b8ca9c40a
Content-Length: 363
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "fcaea963-ec83-4af4-ae73-5be805ee5429",
    "url": "/v2/buildpacks/fcaea963-ec83-4af4-ae73-5be805ee5429",
    "created_at": "2014-11-24T19:32:37+00:00",
    "updated_at": "2014-11-24T19:32:37+00:00"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": false,
    "filename": "name-483"
  }
}