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.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NSIsImVtYWlsIjoiZW1haWwtMTg1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQzMTAxMzV9.zpqsmMBmeepe6NLxiMwHnHCwJBzjSlttIqY40RVcA6A
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.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NSIsImVtYWlsIjoiZW1haWwtMTg1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQzMTAxMzV9.zpqsmMBmeepe6NLxiMwHnHCwJBzjSlttIqY40RVcA6A" \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: e38538f9-bc6a-445d-a7f0-61f769b45c61
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-a8c49264-6466-4af9-b720-05e53c39b6c7",
      "type": "bits",
      "hash": null,
      "url": null,
      "state": "AWAITING_UPLOAD",
      "error": null,
      "created_at": "2015-02-12T01:42:15Z",
      "_links": {
        "self": {
          "href": "/v3/packages/guid-a8c49264-6466-4af9-b720-05e53c39b6c7"
        },
        "upload": {
          "href": "/v3/packages/guid-a8c49264-6466-4af9-b720-05e53c39b6c7/upload"
        },
        "app": {
          "href": "/v3/apps/guid-1823c24c-4a55-47bf-828a-ef8010c45d5f"
        },
        "space": {
          "href": "/v2/spaces/504e96b9-df03-4d52-a8be-18764be867d1"
        }
      }
    },
    {
      "guid": "guid-d3acee27-b7a4-4b09-852d-b63d2879cbc9",
      "type": "docker",
      "hash": null,
      "url": "http://docker-repo/my-image",
      "state": "READY",
      "error": null,
      "created_at": "2015-02-12T01:42:15Z",
      "_links": {
        "self": {
          "href": "/v3/packages/guid-d3acee27-b7a4-4b09-852d-b63d2879cbc9"
        },
        "app": {
          "href": "/v3/apps/guid-92cce41a-c2a8-4f38-b20c-004b749aa36d"
        },
        "space": {
          "href": "/v2/spaces/504e96b9-df03-4d52-a8be-18764be867d1"
        }
      }
    }
  ]
}