Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Create a Package

POST /v3/apps/:guid/packages

Request

Route

POST /v3/apps/guid-12f5df44-6f9b-4911-8f11-2bb0b008f910/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.eyJ1c2VyX2lkIjoidWFhLWlkLTE3MiIsImVtYWlsIjoiZW1haWwtMTIzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2NjZ9.K20wFiCgRXYti5SVPdoUUAaLw30L9x4L6IeE4MsTwi0
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-12f5df44-6f9b-4911-8f11-2bb0b008f910/packages" -d '{
  "type": "docker",
  "url": "docker://cloudfoundry/runtime-ci"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE3MiIsImVtYWlsIjoiZW1haWwtMTIzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2NjZ9.K20wFiCgRXYti5SVPdoUUAaLw30L9x4L6IeE4MsTwi0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "53c0619b-f071-4675-9af7-fad1b8d5fd10",
  "type": "docker",
  "hash": null,
  "url": "docker://cloudfoundry/runtime-ci",
  "state": "READY",
  "error": null,
  "created_at": "2015-03-03T00:51:06Z",
  "_links": {
    "self": {
      "href": "/v3/packages/53c0619b-f071-4675-9af7-fad1b8d5fd10"
    },
    "app": {
      "href": "/v3/apps/guid-12f5df44-6f9b-4911-8f11-2bb0b008f910"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 1cb7f5d0-a385-4b6a-a4dd-c11bee6e17a1
Content-Length: 402
X-Content-Type-Options: nosniff