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

Route

PUT /v2/buildpacks/f67c807c-2dad-45f8-b05d-14b88aecb1ea

Body

{
  "locked": true
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/f67c807c-2dad-45f8-b05d-14b88aecb1ea" -d '{
  "locked": true
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk2IiwiZW1haWwiOiJlbWFpbC04OEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE3NDYyMzU3fQ.3B0RZZxofuNHeU6UwUSB3FPvqAx0GI1CFygivRVFvA0" \
	-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: be3b6358-012b-4506-a36c-24e1333c5ffa
Content-Length: 362
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "f67c807c-2dad-45f8-b05d-14b88aecb1ea",
    "url": "/v2/buildpacks/f67c807c-2dad-45f8-b05d-14b88aecb1ea",
    "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": true,
    "filename": "name-489"
  }
}

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk2IiwiZW1haWwiOiJlbWFpbC04OEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE3NDYyMzU3fQ.3B0RZZxofuNHeU6UwUSB3FPvqAx0GI1CFygivRVFvA0
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/buildpacks/f67c807c-2dad-45f8-b05d-14b88aecb1ea

Body

{
  "locked": false
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/f67c807c-2dad-45f8-b05d-14b88aecb1ea" -d '{
  "locked": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTk2IiwiZW1haWwiOiJlbWFpbC04OEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE3NDYyMzU3fQ.3B0RZZxofuNHeU6UwUSB3FPvqAx0GI1CFygivRVFvA0" \
	-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: eae26b30-3077-4ee8-8520-bea8d6cbae8b
Content-Length: 363
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "f67c807c-2dad-45f8-b05d-14b88aecb1ea",
    "url": "/v2/buildpacks/f67c807c-2dad-45f8-b05d-14b88aecb1ea",
    "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-489"
  }
}