Change the position of a Buildpack
PUT /v2/buildpacks/:guid
Buildpacks are maintained in an ordered list. If the target position is already occupied,
the entries will be shifted down the list to make room. If the target position is beyond
the end of the current list, the buildpack will be positioned at the end of the list.
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/94b33c46-bd04-4230-9966-01a2c8a3967f
Body
{
"position": 3
}
cURL
curl "https://api.[your-domain.com]/v2/buildpacks/94b33c46-bd04-4230-9966-01a2c8a3967f" -d '{
"position": 3
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxNCIsImVtYWlsIjoiZW1haWwtMjM5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTU3NTQxNTJ9.NF77ikHXVqVHE1k3rJPh8cbQFznLmJSiWMtD3ZNTWp4" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "94b33c46-bd04-4230-9966-01a2c8a3967f",
"url": "/v2/buildpacks/94b33c46-bd04-4230-9966-01a2c8a3967f",
"created_at": "2014-11-05T01:02:32+00:00",
"updated_at": "2014-11-05T01:02:32+00:00"
},
"entity": {
"name": "name_1",
"position": 3,
"enabled": true,
"locked": false,
"filename": "name-1297"
}
}