Home
Version 3
Buildpacks API

Buildpacks API

Lock or unlock a Buildpack

PUT /v2/buildpacks/:guid

Request

Route

PUT /v2/buildpacks/11699d35-86a8-4e2d-b9b4-1fbf32ae9db4

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

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/11699d35-86a8-4e2d-b9b4-1fbf32ae9db4" -d '{
  "locked": true
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzOCIsImVtYWlsIjoiZW1haWwtMTY5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjY2MzM5MDl9.fwyW4kY0jTbls6YiQd5E4qTlLSbPTvrbWe15GehVpOg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "11699d35-86a8-4e2d-b9b4-1fbf32ae9db4",
    "url": "/v2/buildpacks/11699d35-86a8-4e2d-b9b4-1fbf32ae9db4",
    "created_at": "2015-03-10T23:11:48Z",
    "updated_at": "2015-03-10T23:11:48Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": true,
    "filename": "name-676"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 4cffba8c-af2a-4ccb-b924-6c84e562a838
Content-Length: 352
X-Content-Type-Options: nosniff

Request

Route

PUT /v2/buildpacks/11699d35-86a8-4e2d-b9b4-1fbf32ae9db4

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

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/11699d35-86a8-4e2d-b9b4-1fbf32ae9db4" -d '{
  "locked": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIzOCIsImVtYWlsIjoiZW1haWwtMTY5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjY2MzM5MDl9.fwyW4kY0jTbls6YiQd5E4qTlLSbPTvrbWe15GehVpOg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "11699d35-86a8-4e2d-b9b4-1fbf32ae9db4",
    "url": "/v2/buildpacks/11699d35-86a8-4e2d-b9b4-1fbf32ae9db4",
    "created_at": "2015-03-10T23:11:48Z",
    "updated_at": "2015-03-10T23:11:48Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": false,
    "filename": "name-676"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ff837bd4-57fd-49b4-95e9-85d2d9aa3623
Content-Length: 353
X-Content-Type-Options: nosniff