Home
Version 3
Buildpacks API

Buildpacks API

Lock or unlock a Buildpack

PUT /v2/buildpacks/:guid

Request

Route

PUT /v2/buildpacks/208e7399-bfb9-46f1-9dd5-cbe7ca26ab44

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

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/208e7399-bfb9-46f1-9dd5-cbe7ca26ab44" -d '{
  "locked": true
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5MiIsImVtYWlsIjoiZW1haWwtMjIzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDZ9.EOQRquc4qOfYG7KV7zOZ084VCvJltIAjrAIF7jPpLvU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "208e7399-bfb9-46f1-9dd5-cbe7ca26ab44",
    "url": "/v2/buildpacks/208e7399-bfb9-46f1-9dd5-cbe7ca26ab44",
    "created_at": "2015-11-03T00:54:06Z",
    "updated_at": "2015-11-03T00:54:06Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": true,
    "filename": "name-1180"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 9489b4aa-48f9-4b66-b2b2-570fe76c4eb5
Content-Length: 353
X-Content-Type-Options: nosniff

Request

Route

PUT /v2/buildpacks/208e7399-bfb9-46f1-9dd5-cbe7ca26ab44

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

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/208e7399-bfb9-46f1-9dd5-cbe7ca26ab44" -d '{
  "locked": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5MiIsImVtYWlsIjoiZW1haWwtMjIzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDZ9.EOQRquc4qOfYG7KV7zOZ084VCvJltIAjrAIF7jPpLvU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "208e7399-bfb9-46f1-9dd5-cbe7ca26ab44",
    "url": "/v2/buildpacks/208e7399-bfb9-46f1-9dd5-cbe7ca26ab44",
    "created_at": "2015-11-03T00:54:06Z",
    "updated_at": "2015-11-03T00:54:06Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": false,
    "filename": "name-1180"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 6e4d4573-cdfe-4569-b64e-e798d95ecc88
Content-Length: 354
X-Content-Type-Options: nosniff