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)
|
|
|
|
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
Route
PUT /v2/buildpacks/602f7e8b-4cd6-4ffd-a49c-e6acf7c4eec7
Body
{
"locked": true
}
cURL
curl "https://api.[your-domain.com]/v2/buildpacks/602f7e8b-4cd6-4ffd-a49c-e6acf7c4eec7" -d '{
"locked": true
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MiIsImVtYWlsIjoiZW1haWwtMTkzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5NzZ9.w3qZYOkebiu6zsnE5lF9Usc2C47xHJjaHieiGyx_2dA" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "602f7e8b-4cd6-4ffd-a49c-e6acf7c4eec7",
"url": "/v2/buildpacks/602f7e8b-4cd6-4ffd-a49c-e6acf7c4eec7",
"created_at": "2014-12-24T01:39:35+00:00",
"updated_at": "2014-12-24T01:39:35+00:00"
},
"entity": {
"name": "name_1",
"position": 1,
"enabled": true,
"locked": true,
"filename": "name-1669"
}
}
Request
Headers
Route
PUT /v2/buildpacks/602f7e8b-4cd6-4ffd-a49c-e6acf7c4eec7
Body
{
"locked": false
}
cURL
curl "https://api.[your-domain.com]/v2/buildpacks/602f7e8b-4cd6-4ffd-a49c-e6acf7c4eec7" -d '{
"locked": false
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MiIsImVtYWlsIjoiZW1haWwtMTkzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5NzZ9.w3qZYOkebiu6zsnE5lF9Usc2C47xHJjaHieiGyx_2dA" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "602f7e8b-4cd6-4ffd-a49c-e6acf7c4eec7",
"url": "/v2/buildpacks/602f7e8b-4cd6-4ffd-a49c-e6acf7c4eec7",
"created_at": "2014-12-24T01:39:35+00:00",
"updated_at": "2014-12-24T01:39:35+00:00"
},
"entity": {
"name": "name_1",
"position": 1,
"enabled": true,
"locked": false,
"filename": "name-1669"
}
}