Application API

Servers API

GET/api/application/servers

Fetching servers

Query parameters

page
per_page
Max is 100.
filter[name]
filter[node_id]
filter[user_id]
Request
GET/api/application/servers
curl "https://panel.example.com/api/application/servers" \
  -H "Authorization: Bearer <token>" \
  -H "Accept: application/json"
Response
{
    "data": [
        {
            "id": "ffa92c56",
            "uuid": "ffa92c56-42e3-4dd4-9999-698008d8c8c9",
            "node_id": 4418,
            "hostname": "langosh.info",
            "name": "culpa",
            "description": null,
            "status": null,
            "usages": { "bandwidth": 0 },
            "limits": {
                "cpu": 2,
                "memory": 2147483648,
                "disk": 21474836480,
                "snapshots": 16,
                "backups": 16,
                "bandwidth": 107374182400,
                "addresses": { "ipv4": [], "ipv6": [] },
                "mac_address": null
            },
            "user_id": 10,
            "vmid": 1631,
            "internal_id": 30
        },
        {
            "id": "01b8d6e4",
            "uuid": "01b8d6e4-0dd2-4050-a134-aead28cea52e",
            "node_id": 4419,
            "hostname": "rolfson.com",
            "name": "tempora",
            "description": null,
            "status": null,
            "usages": { "bandwidth": 0 },
            "limits": {
                "cpu": 2,
                "memory": 2147483648,
                "disk": 21474836480,
                "snapshots": 16,
                "backups": 16,
                "bandwidth": 107374182400,
                "addresses": { "ipv4": [], "ipv6": [] },
                "mac_address": null
            },
            "user_id": 11,
            "vmid": 702,
            "internal_id": 32
        }
    ],
    "meta": {
        "pagination": {
            "total": 302,
            "count": 50,
            "per_page": 50,
            "current_page": 1,
            "total_pages": 7,
            "links": {
                "next": "https://advinservers.com/api/admin/servers?page=2"
            }
        }
    }
}
  • page
  • per_page
    • max is 100
  • filter[name]
  • filter[node_id]
  • filter[user_id]
GET/api/application/servers/<uuid>

Fetching a server

Request
GET/api/application/servers/<uuid>
curl "https://panel.example.com/api/application/servers/<uuid>" \
  -H "Authorization: Bearer <token>" \
  -H "Accept: application/json"
Response
{
    "data": {
        "id": "ffa92c56",
        "uuid": "ffa92c56-42e3-4dd4-9999-698008d8c8c9",
        "node_id": 4418,
        "hostname": "langosh.info",
        "name": "culpa",
        "description": null,
        "status": null,
        "usages": { "bandwidth": 0 },
        "limits": {
            "cpu": 2,
            "memory": 2147483648,
            "disk": 21474836480,
            "snapshots": 16,
            "backups": 16,
            "bandwidth": 107374182400,
            "addresses": { "ipv4": [], "ipv6": [] },
            "mac_address": null
        },
        "user_id": 10,
        "vmid": 1631,
        "internal_id": 30
    }
}
PATCH/api/application/servers/<uuid>

Updating a server's general information

Body parameters

node_idinteger
user_idinteger
status
namestring
hostnamestring
vmidinteger
Request
PATCH/api/application/servers/<uuid>
curl -X PATCH "https://panel.example.com/api/application/servers/<uuid>" \
  -H "Authorization: Bearer <token>" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
    "node_id": 4417,
    "user_id": 1,
    "status": null,
    "name": "ubunt",
    "hostname": "ubuntu.org",
    "vmid": 127080199
  }'
Response
{
    "data": {
        "id": "72ddf699",
        "uuid": "72ddf699-1468-43e2-bd14-65d0d51c9299",
        "node_id": 4417,
        "hostname": "ubuntu.org",
        "name": "ubunt",
        "description": null,
        "status": null,
        "usages": {
            "bandwidth": 0
        },
        "limits": {
            "cpu": 3,
            "memory": 4294967296,
            "disk": 4294967296,
            "snapshots": 0,
            "backups": null,
            "bandwidth": null,
            "addresses": {
                "ipv4": [
                    {
                        "id": 6,
                        "server_id": 352,
                        "type": "ipv4",
                        "address": "1.1.1.2",
                        "cidr": 24,
                        "gateway": "127.0.0.1",
                        "mac_address": null
                    },
                    {
                        "id": 7,
                        "server_id": 352,
                        "type": "ipv4",
                        "address": "192.168.1.2",
                        "cidr": 24,
                        "gateway": "192.168.1.1",
                        "mac_address": null
                    }
                ],
                "ipv6": []
            },
            "mac_address": null
        },
        "user_id": 1,
        "vmid": 127080199,
        "internal_id": 352,
        "user": {
            "data": {
                "id": 1,
                "name": "Mike Hawk",
                "email": "[email protected]",
                "email_verified_at": null,
                "root_admin": true,
                "servers_count": 0
            }
        },
        "node": {
            "data": {
                "id": 4417,
                "location_id": 5340,
                "name": "us-southeast",
                "cluster": "us-southeast",
                "fqdn": "us-southeast.performave.com",
                "port": 8006,
                "memory": 68719476736,
                "memory_overallocate": 0,
                "memory_allocated": 6442450944,
                "disk": 137438953472,
                "disk_overallocate": 0,
                "disk_allocated": 6442450944,
                "vm_storage": "local",
                "backup_storage": "local",
                "iso_storage": "local",
                "network": "vmbr0",
                "servers_count": 0
            }
        }
    }
}
PATCH/api/application/servers/<uuid>/settings/build

Updating a server's build

Body parameters

address_idsarray
snapshot_limitinteger
backup_limit
bandwidth_limit
bandwidth_usageinteger
cpuinteger
memoryinteger
diskinteger
Request
PATCH/api/application/servers/<uuid>/settings/build
curl -X PATCH "https://panel.example.com/api/application/servers/<uuid>/settings/build" \
  -H "Authorization: Bearer <token>" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
    "address_ids": [
      6,
      7
    ],
    "snapshot_limit": 0,
    "backup_limit": null,
    "bandwidth_limit": null,
    "bandwidth_usage": 0,
    "cpu": 3,
    "memory": 4294967296,
    "disk": 4294967296
  }'
Response
{
    "data": {
        "id": "72ddf699",
        "uuid": "72ddf699-1468-43e2-bd14-65d0d51c9299",
        "node_id": 4417,
        "hostname": "ubuntu.org",
        "name": "ubuntu",
        "description": null,
        "status": null,
        "usages": {
            "bandwidth": 0
        },
        "limits": {
            "cpu": 3,
            "memory": 4294967296,
            "disk": 4294967296,
            "snapshots": 0,
            "backups": null,
            "bandwidth": null,
            "addresses": {
                "ipv4": [
                    {
                        "id": 6,
                        "server_id": 352,
                        "type": "ipv4",
                        "address": "1.1.1.2",
                        "cidr": 24,
                        "gateway": "127.0.0.1",
                        "mac_address": null
                    },
                    {
                        "id": 7,
                        "server_id": 352,
                        "type": "ipv4",
                        "address": "192.168.1.2",
                        "cidr": 24,
                        "gateway": "192.168.1.1",
                        "mac_address": null
                    }
                ],
                "ipv6": []
            },
            "mac_address": null
        },
        "user_id": 1,
        "vmid": 127080199,
        "internal_id": 352,
        "user": {
            "data": {
                "id": 1,
                "name": "Mike Hawk",
                "email": "[email protected]",
                "email_verified_at": null,
                "root_admin": true,
                "servers_count": 0
            }
        },
        "node": {
            "data": {
                "id": 4417,
                "location_id": 5340,
                "name": "us-southeast",
                "cluster": "us-southeast",
                "fqdn": "us-southeast.performave.com",
                "port": 8006,
                "memory": 68719476736,
                "memory_overallocate": 0,
                "memory_allocated": 6442450944,
                "disk": 137438953472,
                "disk_overallocate": 0,
                "disk_allocated": 6442450944,
                "vm_storage": "local",
                "backup_storage": "local",
                "iso_storage": "local",
                "network": "vmbr0",
                "servers_count": 0
            }
        }
    }
}
POST/api/application/servers

Creating a server

Body parameters

node_idinteger
user_idinteger
namestring
hostnamestring
vmid
limits.cpuinteger
limits.memoryinteger
limits.diskinteger
limits.snapshotsinteger
limits.backups
limits.bandwidth
limits.address_idsarray
account_passwordstring
should_create_serverboolean
template_uuidstring
start_on_completionboolean
Request
POST/api/application/servers
curl -X POST "https://panel.example.com/api/application/servers" \
  -H "Authorization: Bearer <token>" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data '{
    "node_id": 4417,
    "user_id": 1,
    "name": "testee",
    "hostname": "advinservers.com",
    "vmid": null,
    "limits": {
      "cpu": 3,
      "memory": 4294967296,
      "disk": 3145728000,
      "snapshots": 0,
      "backups": null,
      "bandwidth": null,
      "address_ids": []
    },
    "account_password": "q%#tUyLPAm@2q",
    "should_create_server": true,
    "template_uuid": "d176b498-87e8-421f-a958-048ef15ef199",
    "start_on_completion": false
  }'
Response
{
    "data": {
        "id": "d45309ad",
        "uuid": "d45309ad-9c9e-4ea7-b386-01a2e54a421e",
        "node_id": 4417,
        "hostname": "advinservers.com",
        "name": "testee",
        "description": null,
        "status": "installing",
        "usages": {
            "bandwidth": 0
        },
        "limits": {
            "cpu": 3,
            "memory": 4294967296,
            "disk": 3145728000,
            "snapshots": 0,
            "backups": null,
            "bandwidth": null,
            "addresses": {
                "ipv4": [],
                "ipv6": []
            },
            "mac_address": null
        },
        "user_id": 1,
        "vmid": 549998493,
        "internal_id": 355,
        "user": {
            "data": {
                "id": 1,
                "name": "Mike Hawk",
                "email": "[email protected]",
                "email_verified_at": null,
                "root_admin": true,
                "servers_count": 0
            }
        },
        "node": {
            "data": {
                "id": 4417,
                "location_id": 5340,
                "name": "us-southeast",
                "cluster": "us-southeast",
                "fqdn": "us-southeast.performave.com",
                "port": 8006,
                "memory": 68719476736,
                "memory_overallocate": 0,
                "memory_allocated": 10737418240,
                "disk": 137438953472,
                "disk_overallocate": 0,
                "disk_allocated": 9588178944,
                "vm_storage": "local",
                "backup_storage": "local",
                "iso_storage": "local",
                "network": "vmbr0",
                "servers_count": 0
            }
        }
    }
}
DELETE/api/application/servers/<uuid>

Deleting a server

Parameters

no_purge
Set this to true to retain the VM and its associated files on the Proxmox node while deleting it off of Convoy.

Returns no content

Request
DELETE/api/application/servers/<uuid>
curl -X DELETE "https://panel.example.com/api/application/servers/<uuid>" \
  -H "Authorization: Bearer <token>" \
  -H "Accept: application/json"
  • no_purge
    • set this to true to retain the VM and its associated files on the Proxmox node while deleting it off of Convoy
POST/api/application/servers/<uuid>/settings/suspend

Suspending a server

No parameters/body is needed and no content is returned if successful

Request
POST/api/application/servers/<uuid>/settings/suspend
curl -X POST "https://panel.example.com/api/application/servers/<uuid>/settings/suspend" \
  -H "Authorization: Bearer <token>" \
  -H "Accept: application/json"
POST/api/application/servers/<uuid>/settings/unsuspend

Unsuspending a server

No parameters/body is needed and no content is returned if successful

Request
POST/api/application/servers/<uuid>/settings/unsuspend
curl -X POST "https://panel.example.com/api/application/servers/<uuid>/settings/unsuspend" \
  -H "Authorization: Bearer <token>" \
  -H "Accept: application/json"