Home
Version 3
Buildpacks API

Buildpacks API

Lock or unlock a Buildpack

PUT /v2/buildpacks/:guid

Request

Route

PUT /v2/buildpacks/6fec1587-b4d5-432b-8ee5-72a39665f948

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

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/6fec1587-b4d5-432b-8ee5-72a39665f948" -d '{
  "locked": true
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3MCIsImVtYWlsIjoiZW1haWwtMjYwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MTZ9.lZIcqQNZ5gny1zhYzznwbl2Y2wf1ChUdPvzWSmiBiR0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "6fec1587-b4d5-432b-8ee5-72a39665f948",
    "url": "/v2/buildpacks/6fec1587-b4d5-432b-8ee5-72a39665f948",
    "created_at": "2015-08-31T21:50:16Z",
    "updated_at": "2015-08-31T21:50:16Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": true,
    "filename": "name-2241"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 6d5ce561-b287-4ac2-ba3f-4c8c7f2ab388
Content-Length: 353
X-Content-Type-Options: nosniff

Request

Route

PUT /v2/buildpacks/6fec1587-b4d5-432b-8ee5-72a39665f948

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

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/6fec1587-b4d5-432b-8ee5-72a39665f948" -d '{
  "locked": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3MCIsImVtYWlsIjoiZW1haWwtMjYwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDE2NjI2MTZ9.lZIcqQNZ5gny1zhYzznwbl2Y2wf1ChUdPvzWSmiBiR0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "6fec1587-b4d5-432b-8ee5-72a39665f948",
    "url": "/v2/buildpacks/6fec1587-b4d5-432b-8ee5-72a39665f948",
    "created_at": "2015-08-31T21:50:16Z",
    "updated_at": "2015-08-31T21:50:16Z"
  },
  "entity": {
    "name": "name_1",
    "position": 1,
    "enabled": true,
    "locked": false,
    "filename": "name-2241"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: fe8f2d39-2b0a-48aa-a2c1-f9cab5695611
Content-Length: 354
X-Content-Type-Options: nosniff