Ploi Core

List packages

List packages

List all the packages for an installation.

GET api/packages

Example request:

curl -X GET "https://panel.example.hosting.com/api/packages" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Example response:


HTTP/1.1 200 OK
Content-Type: application/json

{
    "data": [
        {
            "id": 1,
            "name": "Basic",
            "maximum_servers": 1,
            "maximum_sites": 3,
            "price_hourly": 0.0,
            "price_monthly": 0.0,
            "price_yearly": 0.0,
            "stripe_plan_id": null,
            "currency": "usd",
            "server_permissions": {
                "create": false,
                "update": false,
                "delete": false
            },
            "site_permissions": {
                "create": true,
                "update": true,
                "delete": true
            },
            "created_at": "2022-07-23T13:35:51.000000Z"
        },
        {
            "id": 2,
            "name": "Pro",
            "maximum_servers": 5,
            "maximum_sites": 10,
            "price_hourly": 0.0,
            "price_monthly": 0.0,
            "price_yearly": 0.0,
            "stripe_plan_id": null,
            "currency": "usd",
            "server_permissions": {
                "create": true,
                "update": true,
                "delete": true
            },
            "site_permissions": {
                "create": true,
                "update": true,
                "delete": true
            },
            "created_at": "2022-07-23T13:35:51.000000Z"
        },
        {
            "id": 3,
            "name": "Unlimited",
            "maximum_servers": 0,
            "maximum_sites": 0,
            "price_hourly": 0.0,
            "price_monthly": 0.0,
            "price_yearly": 0.0,
            "stripe_plan_id": null,
            "currency": "usd",
            "server_permissions": {
                "create": true,
                "update": true,
                "delete": true
            },
            "site_permissions": {
                "create": true,
                "update": true,
                "delete": true
            },
            "created_at": "2022-07-23T13:35:51.000000Z"
        }
    ],
    "links": {
        "first": "https://panel.example.hosting.com/api/packages?page=1",
        "last": "https://panel.example.hosting.com/api/packages?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://panel.example.hosting.com/api/packages",
        "per_page": 15,
        "to": 4,
        "total": 4
    }
}