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.eyJ1c2VyX2lkIjoidWFhLWlkLTE1MiIsImVtYWlsIjoiZW1haWwtOTJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1ODg1NTY2OX0.T0sZ4GYy9wVnTOzI7ATDKz8OfDiW6ueCriWQvHHNxd4
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/packages?page=1&per_page=2" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE1MiIsImVtYWlsIjoiZW1haWwtOTJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLnJlYWQiLCJjbG91ZF9jb250cm9sbGVyLndyaXRlIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1ODg1NTY2OX0.T0sZ4GYy9wVnTOzI7ATDKz8OfDiW6ueCriWQvHHNxd4" \
	-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-4cd03997-5bf8-495a-9187-2069a91ff30d",
      "type": "bits",
      "data": {
        "error": null,
        "hash": {
          "type": "sha1",
          "value": null
        }
      },
      "state": "AWAITING_UPLOAD",
      "created_at": "2016-03-17T21:41:09Z",
      "updated_at": null,
      "links": {
        "self": {
          "href": "/v3/packages/guid-4cd03997-5bf8-495a-9187-2069a91ff30d"
        },
        "upload": {
          "href": "/v3/packages/guid-4cd03997-5bf8-495a-9187-2069a91ff30d/upload",
          "method": "POST"
        },
        "download": {
          "href": "/v3/packages/guid-4cd03997-5bf8-495a-9187-2069a91ff30d/download",
          "method": "GET"
        },
        "stage": {
          "href": "/v3/packages/guid-4cd03997-5bf8-495a-9187-2069a91ff30d/droplets",
          "method": "POST"
        },
        "app": {
          "href": "/v3/apps/guid-ea54d36f-e526-4a4f-94d0-cbb41a91d89d"
        }
      }
    },
    {
      "guid": "guid-e12a09e7-5d3d-4685-9330-f3b06115e997",
      "type": "docker",
      "data": {
        "image": "http://location-of-image.com"
      },
      "state": "READY",
      "created_at": "2016-03-17T21:41:09Z",
      "updated_at": null,
      "links": {
        "self": {
          "href": "/v3/packages/guid-e12a09e7-5d3d-4685-9330-f3b06115e997"
        },
        "stage": {
          "href": "/v3/packages/guid-e12a09e7-5d3d-4685-9330-f3b06115e997/droplets",
          "method": "POST"
        },
        "app": {
          "href": "/v3/apps/guid-ea54d36f-e526-4a4f-94d0-cbb41a91d89d"
        }
      }
    }
  ]
}

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.011816
Content-Length: 1906