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.eyJ1c2VyX2lkIjoidWFhLWlkLTIwNiIsImVtYWlsIjoiZW1haWwtMTM3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDk1MzE1MjN9.5WmrDPqvNSbVxe_MBMF8IwJjZ4Cqh6dTEEes2sg0WhQ
Host: example.org
Cookie: 

cURL

curl "https://api.[your-domain.com]/v3/packages?page=1&per_page=2" -X GET \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwNiIsImVtYWlsIjoiZW1haWwtMTM3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5yZWFkIiwiY2xvdWRfY29udHJvbGxlci53cml0ZSJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDk1MzE1MjN9.5WmrDPqvNSbVxe_MBMF8IwJjZ4Cqh6dTEEes2sg0WhQ" \
	-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-b8cdec45-ebe1-4239-8380-adf827320cb0",
      "type": "bits",
      "data": {
        "hash": {
          "type": "sha1",
          "value": null
        },
        "error": null
      },
      "state": "AWAITING_UPLOAD",
      "created_at": "2015-11-30T23:38:43Z",
      "updated_at": null,
      "links": {
        "self": {
          "href": "/v3/packages/guid-b8cdec45-ebe1-4239-8380-adf827320cb0"
        },
        "upload": {
          "href": "/v3/packages/guid-b8cdec45-ebe1-4239-8380-adf827320cb0/upload",
          "method": "POST"
        },
        "download": {
          "href": "/v3/packages/guid-b8cdec45-ebe1-4239-8380-adf827320cb0/download",
          "method": "GET"
        },
        "stage": {
          "href": "/v3/packages/guid-b8cdec45-ebe1-4239-8380-adf827320cb0/droplets",
          "method": "POST"
        },
        "app": {
          "href": "/v3/apps/guid-fa6b8eb8-f0af-41c9-85ba-c8733d4ce1ec"
        }
      }
    },
    {
      "guid": "guid-58b36c3c-e985-4964-ba5e-136279f4b777",
      "type": "docker",
      "data": {
        "image": "http://location-of-image.com",
        "credentials": {

        },
        "store_image": false,
        "error": null
      },
      "state": "READY",
      "created_at": "2015-11-30T23:38:43Z",
      "updated_at": null,
      "links": {
        "self": {
          "href": "/v3/packages/guid-58b36c3c-e985-4964-ba5e-136279f4b777"
        },
        "app": {
          "href": "/v3/apps/guid-fa6b8eb8-f0af-41c9-85ba-c8733d4ce1ec"
        }
      }
    }
  ]
}

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.014543
Content-Length: 1854