Buildpacks API

Lock or unlock a Buildpack

PUT /v2/buildpacks/:guid

Request

Route

PUT /v2/buildpacks/17a15e9f-b13d-4dc6-9065-fd871f8edd07

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
stack The stack the buildpack belongs to.
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.eyJ1c2VyX2lkIjoidWFhLWlkLTE3NSIsImVtYWlsIjoiZW1haWwtMTMwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTF9.O0Z6qfc-dPv0lqKX898w-qibuuO3GgQfBREkAvjDZ7Y
Host: example.org
Content-Type: application/json
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/17a15e9f-b13d-4dc6-9065-fd871f8edd07" -d '{
  "locked": true
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3NSIsImVtYWlsIjoiZW1haWwtMTMwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTF9.O0Z6qfc-dPv0lqKX898w-qibuuO3GgQfBREkAvjDZ7Y" \
	-H "Host: example.org" \
	-H "Content-Type: application/json" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "17a15e9f-b13d-4dc6-9065-fd871f8edd07",
    "url": "/v2/buildpacks/17a15e9f-b13d-4dc6-9065-fd871f8edd07",
    "created_at": "2016-06-08T16:41:31Z",
    "updated_at": "2016-06-08T16:41:31Z"
  },
  "entity": {
    "name": "name_1",
    "stack": "cflinuxfs4",
    "position": 1,
    "enabled": true,
    "locked": true,
    "filename": "name-1628"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: ad2e812a-7740-4f23-8535-b719a60c7fa7
Content-Length: 353
X-Content-Type-Options: nosniff

Request

Route

PUT /v2/buildpacks/17a15e9f-b13d-4dc6-9065-fd871f8edd07

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
stack The stack the buildpack belongs to.
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.eyJ1c2VyX2lkIjoidWFhLWlkLTE3NSIsImVtYWlsIjoiZW1haWwtMTMwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTF9.O0Z6qfc-dPv0lqKX898w-qibuuO3GgQfBREkAvjDZ7Y
Host: example.org
Content-Type: application/json
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/17a15e9f-b13d-4dc6-9065-fd871f8edd07" -d '{
  "locked": false
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3NSIsImVtYWlsIjoiZW1haWwtMTMwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTF9.O0Z6qfc-dPv0lqKX898w-qibuuO3GgQfBREkAvjDZ7Y" \
	-H "Host: example.org" \
	-H "Content-Type: application/json" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "17a15e9f-b13d-4dc6-9065-fd871f8edd07",
    "url": "/v2/buildpacks/17a15e9f-b13d-4dc6-9065-fd871f8edd07",
    "created_at": "2016-06-08T16:41:31Z",
    "updated_at": "2016-06-08T16:41:31Z"
  },
  "entity": {
    "name": "name_1",
    "stack": "cflinuxfs4",
    "position": 1,
    "enabled": true,
    "locked": false,
    "filename": "name-1628"
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 133318ee-e0af-4df4-b8c4-4770b8ab5da3
Content-Length: 354
X-Content-Type-Options: nosniff