Home
Version 3
Buildpacks API

Buildpacks API

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)
  • Golang_buildpack
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

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5NSIsImVtYWlsIjoiZW1haWwtMTMyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM2ODZ9.Rljb6xlj1THehYYglvD8v8iI-4eAh2psEB9OvGN84Qg
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/buildpacks" -d '{
  "name": "Golang_buildpack"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE5NSIsImVtYWlsIjoiZW1haWwtMTMyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM2ODZ9.Rljb6xlj1THehYYglvD8v8iI-4eAh2psEB9OvGN84Qg" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "59b05df2-2c56-45d3-b3e0-13661b47485d",
    "url": "/v2/buildpacks/59b05df2-2c56-45d3-b3e0-13661b47485d",
    "created_at": "2015-12-22T18:28:06Z",
    "updated_at": null
  },
  "entity": {
    "name": "Golang_buildpack",
    "position": 1,
    "enabled": true,
    "locked": false,
    "filename": null
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/buildpacks/59b05df2-2c56-45d3-b3e0-13661b47485d
X-VCAP-Request-ID: 
Content-Length: 339
X-Content-Type-Options: nosniff