Assign a Buildpack to a Stack
PUT /v2/buildpacks/:guid
Buildpacks can be assigned to different stacks on the system. Only buildpacks which match the stack of the app will be utilized.
Some buildpacks specify a stack via their manifest, and this stack is automatically assigned. It can also be manually assigned via this endpoint.
If a buildpack stack field is null, it will be handled as belonging to all stacks on the system.
Request
Route
PUT /v2/buildpacks/591bd6c5-2330-4dc1-9400-a405dc659ee9
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)
|
|
|
|
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
|
|
|
|
{
"stack": "cflinuxfs4"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/buildpacks/591bd6c5-2330-4dc1-9400-a405dc659ee9" -d '{
"stack": "cflinuxfs4"
}' -X PUT \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3NiIsImVtYWlsIjoiZW1haWwtMTMxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTF9.CjoftEa2s9Qh96K-G-DZ5ewXTgqDND8fTR6BjpmmxIE" \
-H "Host: example.org" \
-H "Content-Type: application/json" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "591bd6c5-2330-4dc1-9400-a405dc659ee9",
"url": "/v2/buildpacks/591bd6c5-2330-4dc1-9400-a405dc659ee9",
"created_at": "2016-06-08T16:41:31Z",
"updated_at": "2016-06-08T16:41:31Z"
},
"entity": {
"name": "name_1",
"stack": "cflinuxfs4",
"position": 3,
"enabled": true,
"locked": false,
"filename": "name-1631"
}
}
Headers