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.eyJ1c2VyX2lkIjoidWFhLWlkLTE2OSIsImVtYWlsIjoiZW1haWwtMTIwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2NjZ9.URvI7MfkI8wCr1jWx0wEWgp6zLz4KPVwWt_tW8W0tLw
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/packages?page=1&per_page=2" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2OSIsImVtYWlsIjoiZW1haWwtMTIwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjU5NDg2NjZ9.URvI7MfkI8wCr1jWx0wEWgp6zLz4KPVwWt_tW8W0tLw" \
	-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-8eb6a32d-b9c9-4e45-a738-762ed1a71b78",
      "type": "bits",
      "hash": null,
      "url": null,
      "state": "AWAITING_UPLOAD",
      "error": null,
      "created_at": "2015-03-03T00:51:06Z",
      "_links": {
        "self": {
          "href": "/v3/packages/guid-8eb6a32d-b9c9-4e45-a738-762ed1a71b78"
        },
        "upload": {
          "href": "/v3/packages/guid-8eb6a32d-b9c9-4e45-a738-762ed1a71b78/upload"
        },
        "app": {
          "href": "/v3/apps/guid-b9223e5c-500a-474a-a99d-f1e1e0b89122"
        }
      }
    },
    {
      "guid": "guid-94398cc5-8c58-4505-9798-dd9f01b70a83",
      "type": "docker",
      "hash": null,
      "url": "http://docker-repo/my-image",
      "state": "READY",
      "error": null,
      "created_at": "2015-03-03T00:51:06Z",
      "_links": {
        "self": {
          "href": "/v3/packages/guid-94398cc5-8c58-4505-9798-dd9f01b70a83"
        },
        "app": {
          "href": "/v3/apps/guid-b9223e5c-500a-474a-a99d-f1e1e0b89122"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 83fba813-0e9c-4d37-b7a1-c4b456feefa2
Content-Length: 1346
X-Content-Type-Options: nosniff