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

Route

PUT /v2/buildpacks/8267fec6-bd49-40b0-bb87-5f469653a58b

Body

{
  "locked": true
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/8267fec6-bd49-40b0-bb87-5f469653a58b" -d '{
  "locked": true
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4MyIsImVtYWlsIjoiZW1haWwtMTI0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjIzMjM1NDF9.z6uAI7Qax01l6VmKfcF4E_bEbAMSIroFPvRBcCCCoiA" \
	-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: 822c7bfd-adcc-4b9a-8f83-762ac57e6344
Content-Length: 363
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "8267fec6-bd49-40b0-bb87-5f469653a58b",
    "url": "/v2/buildpacks/8267fec6-bd49-40b0-bb87-5f469653a58b",
    "created_at": "2015-01-20T01:52:21+00:00",
    "updated_at": "2015-01-20T01:52:21+00:00"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": true,
    "filename": "name-1350"
  }
}

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4MyIsImVtYWlsIjoiZW1haWwtMTI0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjIzMjM1NDF9.z6uAI7Qax01l6VmKfcF4E_bEbAMSIroFPvRBcCCCoiA
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/buildpacks/8267fec6-bd49-40b0-bb87-5f469653a58b

Body

{
  "locked": false
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/8267fec6-bd49-40b0-bb87-5f469653a58b" -d '{
  "locked": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4MyIsImVtYWlsIjoiZW1haWwtMTI0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjIzMjM1NDF9.z6uAI7Qax01l6VmKfcF4E_bEbAMSIroFPvRBcCCCoiA" \
	-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: 77d5d565-1df1-4c3d-9e20-1e78acd772a1
Content-Length: 364
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "8267fec6-bd49-40b0-bb87-5f469653a58b",
    "url": "/v2/buildpacks/8267fec6-bd49-40b0-bb87-5f469653a58b",
    "created_at": "2015-01-20T01:52:21+00:00",
    "updated_at": "2015-01-20T01:52:21+00:00"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": false,
    "filename": "name-1350"
  }
}