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

Route

PUT /v2/buildpacks/78f15279-4bef-4b6b-a069-df1e02794714

Body

{
  "locked": true
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/78f15279-4bef-4b6b-a069-df1e02794714" -d '{
  "locked": true
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxMCIsImVtYWlsIjoiZW1haWwtMjEzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE3MDJ9.FzPzbyk1QF8nBzW7XAFRBE3ibp-ZGW7xndiVC1Vihpk" \
	-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: 1c917aaa-bd43-4c42-99a3-5fc940021b3a
Content-Length: 353
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "78f15279-4bef-4b6b-a069-df1e02794714",
    "url": "/v2/buildpacks/78f15279-4bef-4b6b-a069-df1e02794714",
    "created_at": "2015-02-13T22:35:02Z",
    "updated_at": "2015-02-13T22:35:02Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": true,
    "filename": "name-1635"
  }
}

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxMCIsImVtYWlsIjoiZW1haWwtMjEzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE3MDJ9.FzPzbyk1QF8nBzW7XAFRBE3ibp-ZGW7xndiVC1Vihpk
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/buildpacks/78f15279-4bef-4b6b-a069-df1e02794714

Body

{
  "locked": false
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/78f15279-4bef-4b6b-a069-df1e02794714" -d '{
  "locked": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxMCIsImVtYWlsIjoiZW1haWwtMjEzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQ0NzE3MDJ9.FzPzbyk1QF8nBzW7XAFRBE3ibp-ZGW7xndiVC1Vihpk" \
	-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: a422be29-d667-48c8-ace0-4b82dcbc838a
Content-Length: 354
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "78f15279-4bef-4b6b-a069-df1e02794714",
    "url": "/v2/buildpacks/78f15279-4bef-4b6b-a069-df1e02794714",
    "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-1635"
  }
}