Home
Version 3
Buildpacks API

Buildpacks API

Change the position of a Buildpack

PUT /v2/buildpacks/:guid

Buildpacks are maintained in an ordered list. If the target position is already occupied, the entries will be shifted down the list to make room. If the target position is beyond the end of the current list, the buildpack will be positioned at the end of the list.

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

Parameters

Name Description Valid Values Example Values
guid The guid of the Buildpack

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MCIsImVtYWlsIjoiZW1haWwtMTkxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5NzV9.OcqGiQgoGjeWPVfSCIyWQwFFtRe3y0DqWr7w8Xjw-xI
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

PUT /v2/buildpacks/decd27f3-fbab-4f6f-b49b-9f3b0ac36337

Body

{
  "position": 3
}

cURL

curl "https://api.[your-domain.com]/v2/buildpacks/decd27f3-fbab-4f6f-b49b-9f3b0ac36337" -d '{
  "position": 3
}' -X PUT \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MCIsImVtYWlsIjoiZW1haWwtMTkxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5NzV9.OcqGiQgoGjeWPVfSCIyWQwFFtRe3y0DqWr7w8Xjw-xI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: d91f132d-85db-4182-9dfe-35db564c0907
Content-Length: 364
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "decd27f3-fbab-4f6f-b49b-9f3b0ac36337",
    "url": "/v2/buildpacks/decd27f3-fbab-4f6f-b49b-9f3b0ac36337",
    "created_at": "2014-12-24T01:39:35+00:00",
    "updated_at": "2014-12-24T01:39:35+00:00"
  },
  "entity": {
    "name": "name_1",
    "position": 3,
    "enabled": true,
    "locked": false,
    "filename": "name-1663"
  }
}