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.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NyIsImVtYWlsIjoiZW1haWwtMTgzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTM4MzcyNzR9.inc0pwpiqVAdQEOlcyQVoRiwPbz_h6sPb3BGnqsCnUE
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/packages?page=1&per_page=2" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0NyIsImVtYWlsIjoiZW1haWwtMTgzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTM4MzcyNzR9.inc0pwpiqVAdQEOlcyQVoRiwPbz_h6sPb3BGnqsCnUE" \
	-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-d0bbbd02-b6b4-4f87-826a-ee294ae9f94f",
      "type": "bits",
      "data": {
        "error": null,
        "hash": {
          "type": "sha1",
          "value": null
        }
      },
      "state": "AWAITING_UPLOAD",
      "created_at": "2016-01-19T19:41:14Z",
      "updated_at": null,
      "links": {
        "self": {
          "href": "/v3/packages/guid-d0bbbd02-b6b4-4f87-826a-ee294ae9f94f"
        },
        "upload": {
          "href": "/v3/packages/guid-d0bbbd02-b6b4-4f87-826a-ee294ae9f94f/upload",
          "method": "POST"
        },
        "download": {
          "href": "/v3/packages/guid-d0bbbd02-b6b4-4f87-826a-ee294ae9f94f/download",
          "method": "GET"
        },
        "stage": {
          "href": "/v3/packages/guid-d0bbbd02-b6b4-4f87-826a-ee294ae9f94f/droplets",
          "method": "POST"
        },
        "app": {
          "href": "/v3/apps/guid-e1320696-9242-4643-a97b-0ee8077ffabf"
        }
      }
    },
    {
      "guid": "guid-95d8af65-e7dd-4505-a96e-52627d09e805",
      "type": "docker",
      "data": {
        "image": "http://location-of-image.com"
      },
      "state": "READY",
      "created_at": "2016-01-19T19:41:14Z",
      "updated_at": null,
      "links": {
        "self": {
          "href": "/v3/packages/guid-95d8af65-e7dd-4505-a96e-52627d09e805"
        },
        "stage": {
          "href": "/v3/packages/guid-95d8af65-e7dd-4505-a96e-52627d09e805/droplets",
          "method": "POST"
        },
        "app": {
          "href": "/v3/apps/guid-e1320696-9242-4643-a97b-0ee8077ffabf"
        }
      }
    }
  ]
}

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Content-Type: application/json; charset=utf-8
X-Runtime: 0.014220
Content-Length: 1906