Creates an admin Buildpack
POST /v2/buildpacks
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
|
|
|
|
Request
Headers
Route
POST /v2/buildpacks
Body
{
"name": "Golang_buildpack"
}
cURL
curl "https://api.[your-domain.com]/v2/buildpacks" -d '{
"name": "Golang_buildpack"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxMCIsImVtYWlsIjoiZW1haWwtMjM1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTU3NTQxNTJ9.LoyKH0iULnkZGg3PuhyZ_lnk-lobdZjt9j-yYg_WsA4" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "a221dfbc-a819-43aa-8707-6428aeba4973",
"url": "/v2/buildpacks/a221dfbc-a819-43aa-8707-6428aeba4973",
"created_at": "2014-11-05T01:02:32+00:00",
"updated_at": null
},
"entity": {
"name": "Golang_buildpack",
"position": 1,
"enabled": true,
"locked": false,
"filename": null
}
}