Home
Version 3
Buildpacks API

Buildpacks API

Lock or unlock a Buildpack

PUT /v2/buildpacks/:guid

Request

Route

PUT /v2/buildpacks/752aecb1-7a1a-4437-85fe-64cb67b0ad79

Parameters

Name Description Valid Values Example Values
guid The guid of the Buildpack

Body

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
{
  "locked": true
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MSIsImVtYWlsIjoiZW1haWwtMTU5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk3ODl9.n4VJ6GlQcpUCo5iOEnK-P55Cwf5Zv5X25wVC4010uZU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/752aecb1-7a1a-4437-85fe-64cb67b0ad79" -d '{
  "locked": true
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MSIsImVtYWlsIjoiZW1haWwtMTU5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk3ODl9.n4VJ6GlQcpUCo5iOEnK-P55Cwf5Zv5X25wVC4010uZU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "752aecb1-7a1a-4437-85fe-64cb67b0ad79",
    "url": "/v2/buildpacks/752aecb1-7a1a-4437-85fe-64cb67b0ad79",
    "created_at": "2015-07-06T23:23:09Z",
    "updated_at": "2015-07-06T23:23:09Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": true,
    "filename": "name-1594"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 3128b4f8-e334-4e7b-b7cb-0372d3c63ada
Content-Length: 353
X-Content-Type-Options: nosniff

Request

Route

PUT /v2/buildpacks/752aecb1-7a1a-4437-85fe-64cb67b0ad79

Parameters

Name Description Valid Values Example Values
guid The guid of the Buildpack

Body

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
{
  "locked": false
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MSIsImVtYWlsIjoiZW1haWwtMTU5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk3ODl9.n4VJ6GlQcpUCo5iOEnK-P55Cwf5Zv5X25wVC4010uZU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/752aecb1-7a1a-4437-85fe-64cb67b0ad79" -d '{
  "locked": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MSIsImVtYWlsIjoiZW1haWwtMTU5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk3ODl9.n4VJ6GlQcpUCo5iOEnK-P55Cwf5Zv5X25wVC4010uZU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "752aecb1-7a1a-4437-85fe-64cb67b0ad79",
    "url": "/v2/buildpacks/752aecb1-7a1a-4437-85fe-64cb67b0ad79",
    "created_at": "2015-07-06T23:23:09Z",
    "updated_at": "2015-07-06T23:23:09Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": false,
    "filename": "name-1594"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 59e9e6ca-7ccb-473f-8913-059c3ca06247
Content-Length: 354
X-Content-Type-Options: nosniff