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.eyJ1c2VyX2lkIjoidWFhLWlkLTI2MiIsImVtYWlsIjoiZW1haWwtMTkwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzE2NDY2Mzh9.ticT-pp7x9reQH97EhZUPfF2lWrHMpO9M6NZw4_HkP8
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/packages?page=1&per_page=2" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2MiIsImVtYWlsIjoiZW1haWwtMTkwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzE2NDY2Mzh9.ticT-pp7x9reQH97EhZUPfF2lWrHMpO9M6NZw4_HkP8" \
	-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-6305bccf-030b-464b-ac04-ba4282589abe",
      "type": "bits",
      "hash": null,
      "url": null,
      "state": "AWAITING_UPLOAD",
      "error": null,
      "created_at": "2015-05-07T23:37:18Z",
      "updated_at": null,
      "_links": {
        "self": {
          "href": "/v3/packages/guid-6305bccf-030b-464b-ac04-ba4282589abe"
        },
        "upload": {
          "href": "/v3/packages/guid-6305bccf-030b-464b-ac04-ba4282589abe/upload",
          "method": "POST"
        },
        "app": {
          "href": "/v3/apps/guid-6802487e-2b32-4b0f-87e1-6b5a145ad3e7"
        }
      }
    },
    {
      "guid": "guid-0d7fcee0-6d18-4863-8936-0f664272b096",
      "type": "docker",
      "hash": null,
      "url": "http://docker-repo/my-image",
      "state": "READY",
      "error": null,
      "created_at": "2015-05-07T23:37:18Z",
      "updated_at": null,
      "_links": {
        "self": {
          "href": "/v3/packages/guid-0d7fcee0-6d18-4863-8936-0f664272b096"
        },
        "app": {
          "href": "/v3/apps/guid-6802487e-2b32-4b0f-87e1-6b5a145ad3e7"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: f62f3318-13ae-4de2-a92b-168d1eb2df9c
Content-Length: 1426
X-Content-Type-Options: nosniff