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.eyJ1c2VyX2lkIjoidWFhLWlkLTEyNCIsImVtYWlsIjoiZW1haWwtOTRAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyMjk5MDg3MX0.MDIaywA1ZysPu7bksAazwyv_SXoeF-T_sngaFjpuOEc
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v3/apps/guid-e572fe45-0fb8-4c88-9e1c-30d96ccd460e/packages

Body

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

cURL

curl "https://api.[your-domain.com]/v3/apps/guid-e572fe45-0fb8-4c88-9e1c-30d96ccd460e/packages" -d '{
  "type": "docker",
  "url": "docker://cloudfoundry/runtime-ci"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEyNCIsImVtYWlsIjoiZW1haWwtOTRAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyMjk5MDg3MX0.MDIaywA1ZysPu7bksAazwyv_SXoeF-T_sngaFjpuOEc" \
	-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: 7ce49cb4-0ae7-4931-b80d-2293c50a668f
Content-Length: 488
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "guid": "352bfd91-ff28-4652-bf8b-c9a9ded7f291",
  "type": "docker",
  "hash": null,
  "url": "docker://cloudfoundry/runtime-ci",
  "state": "READY",
  "error": null,
  "created_at": "2015-01-27T19:14:31Z",
  "_links": {
    "self": {
      "href": "/v3/packages/352bfd91-ff28-4652-bf8b-c9a9ded7f291"
    },
    "app": {
      "href": "/v3/apps/guid-e572fe45-0fb8-4c88-9e1c-30d96ccd460e"
    },
    "space": {
      "href": "/v2/spaces/7b023d2d-92c0-479c-b5fe-0987a97797f9"
    }
  }
}