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

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1OCIsImVtYWlsIjoiZW1haWwtMTEyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE3OTV9.IMSUxKBRuJq8AtHgbEm992b7RNnPELpyYTd2WYBDD6U
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/packages?page=1&per_page=2" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1OCIsImVtYWlsIjoiZW1haWwtMTEyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzg2NDE3OTV9.IMSUxKBRuJq8AtHgbEm992b7RNnPELpyYTd2WYBDD6U" \
	-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-84ffc554-5d3a-4ea3-bfeb-d796fa82bf7a",
      "type": "bits",
      "hash": {
        "type": "sha1",
        "value": null
      },
      "url": null,
      "state": "AWAITING_UPLOAD",
      "error": null,
      "created_at": "2015-07-27T22:43:15Z",
      "updated_at": null,
      "_links": {
        "self": {
          "href": "/v3/packages/guid-84ffc554-5d3a-4ea3-bfeb-d796fa82bf7a"
        },
        "upload": {
          "href": "/v3/packages/guid-84ffc554-5d3a-4ea3-bfeb-d796fa82bf7a/upload",
          "method": "POST"
        },
        "download": {
          "href": "/v3/packages/guid-84ffc554-5d3a-4ea3-bfeb-d796fa82bf7a/download",
          "method": "GET"
        },
        "stage": {
          "href": "/v3/packages/guid-84ffc554-5d3a-4ea3-bfeb-d796fa82bf7a/droplets",
          "method": "POST"
        },
        "app": {
          "href": "/v3/apps/guid-ec3d91b9-a9c7-4fec-a0d1-d2dfe1c7bac4"
        }
      }
    },
    {
      "guid": "guid-caa0f920-0f24-4a80-b7e4-3119758901c3",
      "type": "docker",
      "hash": {
        "type": "sha1",
        "value": null
      },
      "url": "http://docker-repo/my-image",
      "state": "READY",
      "error": null,
      "created_at": "2015-07-27T22:43:15Z",
      "updated_at": null,
      "_links": {
        "self": {
          "href": "/v3/packages/guid-caa0f920-0f24-4a80-b7e4-3119758901c3"
        },
        "app": {
          "href": "/v3/apps/guid-ec3d91b9-a9c7-4fec-a0d1-d2dfe1c7bac4"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: a9ca03f3-ac53-4d91-af6a-27942d15c263
Content-Length: 1814
X-Content-Type-Options: nosniff