Home
Version 3
Packages (Experimental) API

Packages (Experimental) API

List all Packages

GET /v3/packages

Request

Route

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

Parameters

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

Body

Name Description Default Valid Values Example Values

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTUiLCJlbWFpbCI6ImVtYWlsLTVAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNzQ4MDg0MH0.gFryvR9xbm74Ft7YJCR1JeWe7L4RWBVVnkqzFEOF1YU
Host: example.org
Cookie: 

cURL

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

Response

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-9596f4de-5b50-4748-9b16-e56f1bc766f4",
      "type": "bits",
      "hash": null,
      "url": null,
      "state": "AWAITING_UPLOAD",
      "error": null,
      "created_at": "2015-03-20T18:27:19Z",
      "_links": {
        "self": {
          "href": "/v3/packages/guid-9596f4de-5b50-4748-9b16-e56f1bc766f4"
        },
        "upload": {
          "href": "/v3/packages/guid-9596f4de-5b50-4748-9b16-e56f1bc766f4/upload"
        },
        "app": {
          "href": "/v3/apps/guid-9d7b6ea2-9aef-4c37-b56a-23a823b3fd12"
        }
      }
    },
    {
      "guid": "guid-e893565c-7a79-4816-a984-044a710c42a4",
      "type": "docker",
      "hash": null,
      "url": "http://docker-repo/my-image",
      "state": "READY",
      "error": null,
      "created_at": "2015-03-20T18:27:19Z",
      "_links": {
        "self": {
          "href": "/v3/packages/guid-e893565c-7a79-4816-a984-044a710c42a4"
        },
        "app": {
          "href": "/v3/apps/guid-9d7b6ea2-9aef-4c37-b56a-23a823b3fd12"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 1e6aae69-c886-4dfd-8f82-7d8459569315
Content-Length: 1346
X-Content-Type-Options: nosniff