API Testing
Every module in the Aetheris ecosystem exposes API endpoints that can be tested independently. This page lists all available endpoints, expected responses and how to run the tests locally.
Contributors: when submitting a Pull Request that adds or modifies API routes, you must include at least one test case on this page and verify it passes locally before opening the PR. The CI workflow will check that every new route has a corresponding entry here.
Base URL
All endpoints are served by the Aetheris backend. For local development:
http://localhost:8000For the Vercel demo:
https://aetheris-app-tawny.vercel.appAuthentication
Most endpoints require a Bearer token. Obtain one through the login flow:
TOKEN=$(curl -s -X POST http://localhost:8000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"admin@aetheris.io","password":"admin"}' | jq -r '.token')Include the token in subsequent requests:
curl -H "Authorization: Bearer $TOKEN" http://localhost:8000/api/...Hypervisor Modules
Pterodactyl Driver
Tests the Pterodactyl Application API and Client API integration.
| Endpoint | Method | Description | Expected |
|---|---|---|---|
/api/hypervisors/pterodactyl/servers | GET | List all servers | 200 + array |
/api/hypervisors/pterodactyl/servers/:id | GET | Get server details | 200 + object |
/api/hypervisors/pterodactyl/nodes | GET | List nodes | 200 + array |
/api/hypervisors/pterodactyl/nests | GET | List nests | 200 + array |
/api/hypervisors/pterodactyl/eggs | GET | List eggs for a nest | 200 + array |
/api/hypervisors/pterodactyl/servers/:id/console | GET | Generate WebSocket token | 200 + token |
/api/hypervisors/pterodactyl/servers/:id/start | POST | Start server | 204 |
/api/hypervisors/pterodactyl/servers/:id/stop | POST | Stop server | 204 |
/api/hypervisors/pterodactyl/servers/:id/restart | POST | Restart server | 204 |
# List Pterodactyl servers
curl -s -H "Authorization: Bearer $TOKEN" \
http://localhost:8000/api/hypervisors/pterodactyl/servers | jq .
# Get console token
curl -s -H "Authorization: Bearer $TOKEN" \
http://localhost:8000/api/hypervisors/pterodactyl/srv-8f2a/console | jq .Proxmox VE Driver
Tests the Proxmox VE API v2 integration.
| Endpoint | Method | Description | Expected |
|---|---|---|---|
/api/hypervisors/proxmox/nodes | GET | List Proxmox nodes | 200 + array |
/api/hypervisors/proxmox/vms | GET | List VMs | 200 + array |
/api/hypervisors/proxmox/containers | GET | List LXC containers | 200 + array |
/api/hypervisors/proxmox/vms/:vmid/start | POST | Start VM | 204 |
/api/hypervisors/proxmox/vms/:vmid/stop | POST | Stop VM | 204 |
/api/hypervisors/proxmox/vms/:vmid/status | GET | VM status | 200 + status |
# List Proxmox nodes
curl -s -H "Authorization: Bearer $TOKEN" \
http://localhost:8000/api/hypervisors/proxmox/nodes | jq .VirtFusion Driver
Tests the VirtFusion REST API integration.
| Endpoint | Method | Description | Expected |
|---|---|---|---|
/api/hypervisors/virtfusion/servers | GET | List servers | 200 + array |
/api/hypervisors/virtfusion/servers/:id | GET | Get server | 200 + object |
/api/hypervisors/virtfusion/servers/:id/power | POST | Power action | 204 |
/api/hypervisors/virtfusion/servers/:id/console | GET | Console session | 200 + URL |
# List VirtFusion servers
curl -s -H "Authorization: Bearer $TOKEN" \
http://localhost:8000/api/hypervisors/virtfusion/servers | jq .Billing Module
Invoices
| Endpoint | Method | Description | Expected |
|---|---|---|---|
/api/billing/invoices | GET | List invoices | 200 + array |
/api/billing/invoices/:id | GET | Get invoice | 200 + object |
/api/billing/invoices/:id/pay | POST | Mark as paid | 200 |
/api/billing/invoices/:id/send | POST | Send invoice email | 204 |
/api/billing/summary | GET | Revenue summary | 200 + stats |
Subscriptions
| Endpoint | Method | Description | Expected |
|---|---|---|---|
/api/billing/subscriptions | GET | List subscriptions | 200 + array |
/api/billing/plans | GET | List plans | 200 + array |
Payment Gateways
| Endpoint | Method | Description | Expected |
|---|---|---|---|
/api/billing/gateways/stripe/webhook | POST | Stripe webhook | 200 |
/api/billing/gateways/paypal/webhook | POST | PayPal webhook | 200 |
/api/billing/gateways/mollie/webhook | POST | Mollie webhook | 200 |
# Get revenue summary
curl -s -H "Authorization: Bearer $TOKEN" \
http://localhost:8000/api/billing/summary | jq .
# List recent invoices
curl -s -H "Authorization: Bearer $TOKEN" \
http://localhost:8000/api/billing/invoices | jq 'length'Server Management
| Endpoint | Method | Description | Expected |
|---|---|---|---|
/api/servers | GET | List all servers | 200 + array |
/api/servers/:id | GET | Get server | 200 + object |
/api/servers/:id/start | POST | Start server | 204 |
/api/servers/:id/stop | POST | Stop server | 204 |
/api/servers/:id/restart | POST | Restart server | 204 |
/api/servers/:id/destroy | POST | Destroy server | 204 |
/api/servers/:id/console | GET | VNC console token | 200 + ws URL |
Node Management
| Endpoint | Method | Description | Expected |
|---|---|---|---|
/api/nodes | GET | List nodes | 200 + array |
/api/nodes/:id | GET | Get node | 200 + object |
/api/nodes/:id/resources | GET | Node resources | 200 + CPU/RAM/disk |
/api/nodes/:id/servers | GET | Servers on node | 200 + array |
SFTP Management
| Endpoint | Method | Description | Expected |
|---|---|---|---|
/api/sftp/users | GET | List SFTP users | 200 + array |
/api/sftp/users | POST | Create user | 201 |
/api/sftp/users/:id | DELETE | Delete user | 204 |
/api/sftp/users/:id/toggle | POST | Enable/disable | 200 |
Scheduled Tasks (Cron)
| Endpoint | Method | Description | Expected |
|---|---|---|---|
/api/cron | GET | List cron jobs | 200 + array |
/api/cron | POST | Create cron job | 201 |
/api/cron/:id | DELETE | Delete cron job | 204 |
/api/cron/:id/toggle | POST | Enable/disable | 200 |
/api/cron/:id/run | POST | Trigger manual run | 202 |
Whitelabel / Branding
| Endpoint | Method | Description | Expected |
|---|---|---|---|
/api/whitelabel | GET | Get current config | 200 + config |
/api/whitelabel | PUT | Update config | 200 |
/api/whitelabel/theme | GET | Get theme tokens | 200 + CSS vars |
# Get current whitelabel config
curl -s http://localhost:8000/api/whitelabel | jq '.brand, .theme'System / Health
| Endpoint | Method | Description | Expected |
|---|---|---|---|
/health | GET | Health check | 200 + {"status":"ok"} |
/api/status | GET | System status | 200 + version info |
/api/status/version | GET | Current version | 200 + semver |
Running the Full Test Suite
# Clone the repository
git clone https://github.com/aetheris-project/aetheris-app.git
cd aetheris-app
# Install dependencies
cp .env.example .env
docker compose up -d --build
# Wait for services to be ready
sleep 30
# Run health check
curl -s http://localhost:8000/health
# Run automated API tests
npm test
# Run hypervisor adapter unit tests
python -m pytest tests/ -vAdding New Test Cases
When you add or modify an API endpoint:
- Add the endpoint to the appropriate table above
- Include a curl example that demonstrates the request
- Document the expected response shape
- Open a Pull Request with the test documentation
- The CI workflow will verify that the endpoint exists and returns the expected status code
# Example: adding a test for a new endpoint
# 1. Add to the table above
# 2. Add a curl example:
curl -s -H "Authorization: Bearer $TOKEN" \
-X POST http://localhost:8000/api/servers \
-H "Content-Type: application/json" \
-d '{"name":"test-server","node":"fra-01","egg":1,"docker_image":"ghcr.io/pterodactyl/yolks:ubuntu_22.04"}' \
| jq .