Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

List all Packages

GET /v3/packages

Fields

Name Description Default Valid Values Example Values

Parameters

Name Description Valid Values Example Values
page Page to display
  • >= 1
per_page Number of results per page
  • 1-5000

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5OSIsImVtYWlsIjoiZW1haWwtMjAyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczNzN9.oEtpvjW76s5q9_oQ4-r3E7Bdgd3-Dk70PQEQj5mZbIw
Host: example.org
Cookie: 

Route

GET /v3/packages?page=1&per_page=2

Query Parameters

page: 1
per_page: 2

cURL

curl "https://api.[your-domain.com]/v3/packages?page=1&per_page=2" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5OSIsImVtYWlsIjoiZW1haWwtMjAyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQxMzczNzN9.oEtpvjW76s5q9_oQ4-r3E7Bdgd3-Dk70PQEQj5mZbIw" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 40598a99-1303-4d9d-ae58-6881cb959b01
Content-Length: 1542
X-Content-Type-Options: nosniff

Status

200 OK

Body

{
  "pagination": {
    "total_results": 3,
    "first": {
      "href": "/v3/packages?page=1&per_page=2"
    },
    "last": {
      "href": "/v3/packages?page=2&per_page=2"
    },
    "next": {
      "href": "/v3/packages?page=2&per_page=2"
    },
    "previous": null
  },
  "resources": [
    {
      "guid": "guid-ec7e4be7-e658-417e-b8c4-b348f4c7ad50",
      "type": "bits",
      "hash": null,
      "url": null,
      "state": "AWAITING_UPLOAD",
      "error": null,
      "created_at": "2015-02-10T01:42:53Z",
      "_links": {
        "self": {
          "href": "/v3/packages/guid-ec7e4be7-e658-417e-b8c4-b348f4c7ad50"
        },
        "upload": {
          "href": "/v3/packages/guid-ec7e4be7-e658-417e-b8c4-b348f4c7ad50/upload"
        },
        "app": {
          "href": "/v3/apps/guid-33a53cfb-c942-4ea8-85f4-eaceb778ca74"
        },
        "space": {
          "href": "/v2/spaces/7e30a233-6984-46d7-951e-3de97b5d1ca4"
        }
      }
    },
    {
      "guid": "guid-25de0464-ac4d-414e-a262-22beef022717",
      "type": "docker",
      "hash": null,
      "url": "http://docker-repo/my-image",
      "state": "READY",
      "error": null,
      "created_at": "2015-02-10T01:42:53Z",
      "_links": {
        "self": {
          "href": "/v3/packages/guid-25de0464-ac4d-414e-a262-22beef022717"
        },
        "app": {
          "href": "/v3/apps/guid-68e8c7a7-ae98-47a0-b642-a53775dd975c"
        },
        "space": {
          "href": "/v2/spaces/7e30a233-6984-46d7-951e-3de97b5d1ca4"
        }
      }
    }
  ]
}