Creates an admin Buildpack
POST /v2/buildpacks
Request
Route
POST /v2/buildpacks
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
|
|
|
|
{
"name": "Golang_buildpack"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/buildpacks" -d '{
"name": "Golang_buildpack"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3MiIsImVtYWlsIjoiZW1haWwtMTI3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTF9.mhDLU-Cte7S1LVDj1Eot7nNBDHvcnPk1w2s_PvrLG8o" \
-H "Host: example.org" \
-H "Content-Type: application/json" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "11bd4dd1-134e-4d15-b8fe-dd9f36bae66a",
"url": "/v2/buildpacks/11bd4dd1-134e-4d15-b8fe-dd9f36bae66a",
"created_at": "2016-06-08T16:41:31Z",
"updated_at": "2016-06-08T16:41:26Z"
},
"entity": {
"name": "Golang_buildpack",
"stack": "cflinuxfs4",
"position": 1,
"enabled": true,
"locked": false,
"filename": null
}
}
Headers