Home
Version 3
Buildpacks API

Buildpacks API

Lock or unlock 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.eyJ1c2VyX2lkIjoidWFhLWlkLTM1IiwiZW1haWwiOiJlbWFpbC0yOEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE2NTI2Njk2fQ.FB-eymkZyscg5H6kzEO7sXBhqcR5szbts3Uw6ZFFGJs
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/buildpacks/71dd5780-2a62-426d-bc1f-14fac89a1e69

Body

{
  "locked": true
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/71dd5780-2a62-426d-bc1f-14fac89a1e69" -d '{
  "locked": true
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1IiwiZW1haWwiOiJlbWFpbC0yOEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE2NTI2Njk2fQ.FB-eymkZyscg5H6kzEO7sXBhqcR5szbts3Uw6ZFFGJs" \
	-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: f27241f9-d17d-46ca-85c0-27a2c05fdca0
Content-Length: 362
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "71dd5780-2a62-426d-bc1f-14fac89a1e69",
    "url": "/v2/buildpacks/71dd5780-2a62-426d-bc1f-14fac89a1e69",
    "created_at": "2014-11-13T23:38:16+00:00",
    "updated_at": "2014-11-13T23:38:16+00:00"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": true,
    "filename": "name-318"
  }
}

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1IiwiZW1haWwiOiJlbWFpbC0yOEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE2NTI2Njk2fQ.FB-eymkZyscg5H6kzEO7sXBhqcR5szbts3Uw6ZFFGJs
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/buildpacks/71dd5780-2a62-426d-bc1f-14fac89a1e69

Body

{
  "locked": false
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/71dd5780-2a62-426d-bc1f-14fac89a1e69" -d '{
  "locked": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1IiwiZW1haWwiOiJlbWFpbC0yOEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE2NTI2Njk2fQ.FB-eymkZyscg5H6kzEO7sXBhqcR5szbts3Uw6ZFFGJs" \
	-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: e5215ee9-0913-4767-bb9e-2ab396fe7d4d
Content-Length: 363
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "71dd5780-2a62-426d-bc1f-14fac89a1e69",
    "url": "/v2/buildpacks/71dd5780-2a62-426d-bc1f-14fac89a1e69",
    "created_at": "2014-11-13T23:38:16+00:00",
    "updated_at": "2014-11-13T23:38:16+00:00"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": false,
    "filename": "name-318"
  }
}