Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Create a Package

POST /v3/apps/:guid/packages

Fields

Name Description Default Valid Values Example Values

Parameters

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

Request

Headers

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

Route

POST /v3/apps/guid-064690c9-fe14-42f8-b711-0889eb1064b5/packages

Body

{
  "type": "docker",
  "url": "docker://cloudfoundry/runtime-ci"
}

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-064690c9-fe14-42f8-b711-0889eb1064b5/packages" -d '{
  "type": "docker",
  "url": "docker://cloudfoundry/runtime-ci"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NiIsImVtYWlsIjoiZW1haWwtMTg2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQzMTAxMzV9.yjJ4ASbXKjNHsOgBJtQbPrmok4_pZNj3etxOIJY5p7I" \
	-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: bc9900ce-6f86-4624-ad29-77b7d73a9772
Content-Length: 488
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "guid": "46a47579-0e24-43c9-b632-2e658d8acf78",
  "type": "docker",
  "hash": null,
  "url": "docker://cloudfoundry/runtime-ci",
  "state": "READY",
  "error": null,
  "created_at": "2015-02-12T01:42:15Z",
  "_links": {
    "self": {
      "href": "/v3/packages/46a47579-0e24-43c9-b632-2e658d8acf78"
    },
    "app": {
      "href": "/v3/apps/guid-064690c9-fe14-42f8-b711-0889eb1064b5"
    },
    "space": {
      "href": "/v2/spaces/275869a3-2c39-41ac-ace2-c8f2d923476e"
    }
  }
}