Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

Create a Package

POST /v3/apps/:guid/packages

Request

Route

POST /v3/apps/guid-c24fddff-70a1-4ad0-8bfb-6a74ef1757fa/packages

Body

Name Description Default Valid Values Example Values
type Package type
  • bits
  • docker
url Url of docker image
{
  "type": "docker",
  "url": "docker://cloudfoundry/runtime-ci"
}

Headers

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

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-c24fddff-70a1-4ad0-8bfb-6a74ef1757fa/packages" -d '{
  "type": "docker",
  "url": "docker://cloudfoundry/runtime-ci"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQwNCIsImVtYWlsIjoiZW1haWwtMjk2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk4MDB9.fc9OLTCWptTVurBd0BPEETdTDH0gq2XQlS0_dKVUt5c" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "guid": "fabf7819-21f1-4391-b4a0-f82f3a3d8238",
  "type": "docker",
  "hash": null,
  "url": "docker://cloudfoundry/runtime-ci",
  "state": "READY",
  "error": null,
  "created_at": "2015-07-06T23:23:20Z",
  "updated_at": null,
  "_links": {
    "self": {
      "href": "/v3/packages/fabf7819-21f1-4391-b4a0-f82f3a3d8238"
    },
    "app": {
      "href": "/v3/apps/guid-c24fddff-70a1-4ad0-8bfb-6a74ef1757fa"
    }
  }
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 7497cb1f-edf8-4a04-9474-3cadccd79865
Content-Length: 424
X-Content-Type-Options: nosniff