API Reference
The VeloxaHost REST API lets you manage all platform resources programmatically. Base URL: https://console.veloxahost.com/api/v1
Authentication
All API requests require authentication via a Bearer token. Generate an API key from Settings → API Keys in the console.
curl https://console.veloxahost.com/api/v1/instances \
-H "Authorization: Bearer ghc_your_api_key_here"
API keys are scoped — you choose what permissions each key has:
| Scope | Description |
|---|---|
instances:read | List and view instances |
instances:write | Create, start, stop, delete instances |
networks:read | List networks, firewalls, DNS |
networks:write | Create and modify network resources |
storage:read | List volumes and buckets |
storage:write | Create and modify storage resources |
monitoring:read | Read metrics and alert history |
* | Full access (use carefully) |
Store API keys securely. Treat them like passwords — rotate them regularly and never commit them to source code.
Error Responses
All errors return JSON with an error field:
HTTP/1.1 404 Not Found
{
"error": "Instance 'my-instance' not found"
}
Instances API
GET /instances
List all instances in the current organization.
curl /api/v1/instances \
-H "Authorization: Bearer ghc_..."
POST /instances
Create a new instance.
curl -X POST /api/v1/instances \
-H "Authorization: Bearer ghc_..." \
-H "Content-Type: application/json" \
-d '{
"name": "web-prod-01",
"type": "container",
"image": "ubuntu/22.04",
"cpu_limit": "2",
"memory_limit": "2GiB",
"profile": "default"
}'
GET /instances/{name}
Get details for a specific instance including status, IP addresses, and resource usage.
POST /instances/{name}/action
Perform a lifecycle action: start, stop, restart, freeze, unfreeze.
curl -X POST /api/v1/instances/web-prod-01/action \
-H "Authorization: Bearer ghc_..." \
-d '{"action": "restart"}'
DELETE /instances/{name}
Permanently delete an instance. This cannot be undone. The instance must be stopped first.
Networks API
GET /networks
List all networks in the organization.
POST /networks
Create a new private network.
curl -X POST /api/v1/networks \
-H "Authorization: Bearer ghc_..." \
-d '{
"name": "backend",
"description": "Private backend network",
"config": { "ipv4.address": "10.10.10.1/24" }
}'
GET /firewalls
List all firewall policies.
POST /firewalls
Create a firewall policy with inbound/outbound rules.
Storage API
GET /storage/pools
List storage pools available to the organization.
POST /storage/pools/{pool}/volumes
Create a new storage volume.
curl -X POST /api/v1/storage/pools/default/volumes \
-H "Authorization: Bearer ghc_..." \
-d '{
"name": "db-data",
"config": { "size": "50GiB" }
}'
GET /storage/buckets
List S3-compatible storage buckets.
POST /storage/buckets
Create a new bucket. Returns S3-compatible endpoint and credentials.
Monitoring API
GET /monitoring/metrics/{name}
Get current CPU, memory, and disk metrics for a named instance.
GET /monitoring/alerts
List alert rules for the organization.
POST /monitoring/alerts
Create an alert rule. Supported channels: email, slack, discord, webhook.
curl -X POST /api/v1/monitoring/alerts \
-H "Authorization: Bearer ghc_..." \
-d '{
"name": "High CPU",
"metric": "cpu_percent",
"condition": "gt",
"threshold": 80,
"channels": "email,slack",
"cooldown_minutes": 15
}'
The API rate limit is 60 requests per minute per API key. Exceeded requests return HTTP 429 Too Many Requests.