Home
Version 3
Buildpacks API

Buildpacks API

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

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MyIsImVtYWlsIjoiZW1haWwtMTk0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5NzZ9.c-DDYXZrRFiPsiWBbhiw__SrMxF9_5tj5fopJGXltRw
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

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.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MyIsImVtYWlsIjoiZW1haWwtMTk0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5NzZ9.c-DDYXZrRFiPsiWBbhiw__SrMxF9_5tj5fopJGXltRw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/buildpacks/04d6205d-99e9-48fa-82c0-3701b5a2cc86
X-VCAP-Request-ID: ee7c7ddb-070a-4355-8d28-7ebd3a85873b
Content-Length: 344
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "04d6205d-99e9-48fa-82c0-3701b5a2cc86",
    "url": "/v2/buildpacks/04d6205d-99e9-48fa-82c0-3701b5a2cc86",
    "created_at": "2014-12-24T01:39:36+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "Golang_buildpack",
    "position": 1,
    "enabled": true,
    "locked": false,
    "filename": null
  }
}