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.eyJ1c2VyX2lkIjoidWFhLWlkLTM4OCIsImVtYWlsIjoiZW1haWwtMjc4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzk0MjYyMTV9.gWCEM1XpVZaQ2sp4PL-k3JzNSBSfuiFEB8_hD9NnRX4
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/packages?page=1&per_page=2" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM4OCIsImVtYWlsIjoiZW1haWwtMjc4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mzk0MjYyMTV9.gWCEM1XpVZaQ2sp4PL-k3JzNSBSfuiFEB8_hD9NnRX4" \
	-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-975dc701-9dba-470b-987a-7ebd81a16024",
      "type": "bits",
      "hash": {
        "type": "sha1",
        "value": null
      },
      "url": null,
      "state": "AWAITING_UPLOAD",
      "error": null,
      "created_at": "2015-08-06T00:36:55Z",
      "updated_at": null,
      "_links": {
        "self": {
          "href": "/v3/packages/guid-975dc701-9dba-470b-987a-7ebd81a16024"
        },
        "upload": {
          "href": "/v3/packages/guid-975dc701-9dba-470b-987a-7ebd81a16024/upload",
          "method": "POST"
        },
        "download": {
          "href": "/v3/packages/guid-975dc701-9dba-470b-987a-7ebd81a16024/download",
          "method": "GET"
        },
        "stage": {
          "href": "/v3/packages/guid-975dc701-9dba-470b-987a-7ebd81a16024/droplets",
          "method": "POST"
        },
        "app": {
          "href": "/v3/apps/guid-3758316f-5694-4a51-b45c-b618cc0ac3ed"
        }
      }
    },
    {
      "guid": "guid-f6b59efa-82af-45c9-b21a-1f05e400ac25",
      "type": "docker",
      "hash": {
        "type": "sha1",
        "value": null
      },
      "url": "http://docker-repo/my-image",
      "state": "READY",
      "error": null,
      "created_at": "2015-08-06T00:36:55Z",
      "updated_at": null,
      "_links": {
        "self": {
          "href": "/v3/packages/guid-f6b59efa-82af-45c9-b21a-1f05e400ac25"
        },
        "app": {
          "href": "/v3/apps/guid-3758316f-5694-4a51-b45c-b618cc0ac3ed"
        }
      }
    }
  ]
}

Headers

Content-Type: application/json;charset=utf-8
X-VCAP-Request-ID: 5e490905-33db-4c39-9e15-ca7ebba80772
Content-Length: 1814
X-Content-Type-Options: nosniff