Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Create a Package

POST /v3/apps/:guid/packages

Request

Route

POST /v3/apps/guid-6b79b6a5-e376-4e77-a6ab-bb60e3eb75a4/packages

Parameters

Name Description Valid Values Example Values
type Package type
  • bits
  • docker
url Url of docker image

Body

Name Description Default Valid Values Example Values
{
  "type": "docker",
  "url": "docker://cloudfoundry/runtime-ci"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxNiIsImVtYWlsIjoiZW1haWwtMTY1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzUxMDI4NTR9.rJ0pmqbCCQd10cFRkTa9IaMKMOHT5yGvus7KmFM7lvA
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-6b79b6a5-e376-4e77-a6ab-bb60e3eb75a4/packages" -d '{
  "type": "docker",
  "url": "docker://cloudfoundry/runtime-ci"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxNiIsImVtYWlsIjoiZW1haWwtMTY1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzUxMDI4NTR9.rJ0pmqbCCQd10cFRkTa9IaMKMOHT5yGvus7KmFM7lvA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "a3c4c02f-8c40-4719-94a8-7954e79c90b6",
  "type": "docker",
  "hash": null,
  "url": "docker://cloudfoundry/runtime-ci",
  "state": "READY",
  "error": null,
  "created_at": "2015-06-16T23:40:54Z",
  "updated_at": null,
  "_links": {
    "self": {
      "href": "/v3/packages/a3c4c02f-8c40-4719-94a8-7954e79c90b6"
    },
    "app": {
      "href": "/v3/apps/guid-6b79b6a5-e376-4e77-a6ab-bb60e3eb75a4"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: c2f2755b-300f-4a62-816b-79066f77e96d
Content-Length: 424
X-Content-Type-Options: nosniff