Document: 07_API_CONTRACTS.md
Version: 2.0
Last Updated: January 31, 2026
This document defines the new unified API endpoints for CubeOS. The old fragmented endpoints (/appstore, /appmanager, /services) are deprecated in favor of unified resources.
http://api.cubeos.cube/api/v1
http://10.42.24.1:6010/api/v1
All endpoints (except /auth/login and /health) require JWT authentication.
Authorization: Bearer <token>
GET /api/v1/appsQuery Parameters:
| Param | Type | Description |
|---|---|---|
| type | string | Filter: system, platform, network, ai, user |
| status | string | Filter: running, stopped |
| enabled | boolean | Filter by boot-enabled state |
Response:
{
"apps": [
{
"id": 1,
"name": "pihole",
"display_name": "Pi-hole",
"description": "DNS + DHCP Server",
"type": "system",
"category": "infrastructure",
"enabled": true,
"ports": [
{"port": 6001, "protocol": "tcp", "description": "Admin UI", "is_primary": true}
],
"fqdns": [
{"fqdn": "pihole.cubeos.cube", "subdomain": "pihole"}
],
"status": {
"running": true,
"health": "healthy",
"replicas": "1/1"
}
}
]
}GET /api/v1/apps/{name}POST /api/v1/appsRequest:
{
"name": "filebrowser",
"display_name": "File Browser",
"source": "casaos",
"store_app_id": "filebrowser"
}Response:
{
"id": 10,
"name": "filebrowser",
"display_name": "File Browser",
"type": "user",
"ports": [{"port": 6100, "protocol": "tcp", "is_primary": true}],
"fqdns": [{"fqdn": "filebrowser.cubeos.cube"}],
"status": {"running": true, "health": "starting"}
}DELETE /api/v1/apps/{name}?keep_data=falsePOST /api/v1/apps/{name}/start
POST /api/v1/apps/{name}/stop
POST /api/v1/apps/{name}/restartPOST /api/v1/apps/{name}/enable
POST /api/v1/apps/{name}/disableGET /api/v1/apps/{name}/logs?lines=100&since=2026-01-31T00:00:00ZPOST /api/v1/apps/{name}/torRequest:
{
"enabled": true
}GET /api/v1/network/statusResponse:
{
"mode": "online_eth",
"internet": true,
"ap": {
"ssid": "CubeOS",
"interface": "wlan0",
"clients": 3
},
"upstream": {
"interface": "eth0",
"ip": "192.168.1.100",
"gateway": "192.168.1.1"
},
"subnet": "10.42.24.0/24",
"gateway_ip": "10.42.24.1"
}POST /api/v1/network/modeRequest (OFFLINE):
{
"mode": "offline"
}Request (ONLINE_ETH):
{
"mode": "online_eth"
}Request (ONLINE_WIFI):
{
"mode": "online_wifi",
"ssid": "HomeNetwork",
"password": "secret123"
}GET /api/v1/network/wifi/scanResponse:
{
"networks": [
{
"ssid": "HomeNetwork",
"bssid": "AA:BB:CC:DD:EE:FF",
"signal": -45,
"security": "WPA2",
"frequency": 2437
}
]
}GET /api/v1/network/ap/configPUT /api/v1/network/ap/configRequest:
{
"ssid": "MyCubeOS",
"password": "newpassword123",
"channel": 6,
"hidden": false
}GET /api/v1/vpn/configsResponse:
{
"configs": [
{
"id": 1,
"name": "work-vpn",
"type": "wireguard",
"is_active": true,
"auto_connect": false
}
]
}POST /api/v1/vpn/configsRequest:
{
"name": "work-vpn",
"type": "wireguard",
"config": "base64-encoded-config-file"
}DELETE /api/v1/vpn/configs/{id}POST /api/v1/vpn/configs/{id}/connect
POST /api/v1/vpn/configs/{id}/disconnectGET /api/v1/vpn/statusResponse:
{
"active_config": "work-vpn",
"type": "wireguard",
"connected": true,
"public_ip": "203.0.113.50",
"connected_since": "2026-01-31T10:00:00Z"
}GET /api/v1/mountsResponse:
{
"mounts": [
{
"id": 1,
"name": "nas-backup",
"type": "smb",
"remote_path": "//192.168.1.50/backup",
"local_path": "/cubeos/mounts/nas-backup",
"is_mounted": true,
"auto_mount": true
}
]
}POST /api/v1/mountsRequest (SMB):
{
"name": "nas-backup",
"type": "smb",
"remote_path": "//192.168.1.50/backup",
"username": "backupuser",
"password": "secret",
"auto_mount": true
}Request (NFS):
{
"name": "nfs-share",
"type": "nfs",
"remote_path": "192.168.1.50:/exports/data",
"options": "rw,soft",
"auto_mount": false
}DELETE /api/v1/mounts/{id}POST /api/v1/mounts/{id}/mount
POST /api/v1/mounts/{id}/unmountGET /api/v1/profilesResponse:
{
"profiles": [
{
"id": 1,
"name": "full",
"display_name": "Full",
"description": "All services enabled",
"is_active": true,
"is_system": true,
"apps": [
{"app_id": 1, "app_name": "pihole", "enabled": true},
{"app_id": 2, "app_name": "npm", "enabled": true}
]
}
],
"active_profile": "full"
}POST /api/v1/profiles/{name}/applyResponse:
{
"profile": "minimal",
"started": ["pihole", "npm", "api", "dashboard"],
"stopped": ["ollama", "chromadb"]
}POST /api/v1/profilesRequest:
{
"name": "custom",
"display_name": "My Profile",
"apps": [
{"app_name": "pihole", "enabled": true},
{"app_name": "ollama", "enabled": false}
]
}GET /api/v1/backupsPOST /api/v1/backupsRequest:
{
"name": "manual-backup",
"destination": "nas-backup",
"include_apps": ["*"]
}POST /api/v1/backups/scheduleRequest:
{
"name": "nightly",
"destination": "nas-backup",
"schedule": "0 2 * * *",
"retention_days": 30
}POST /api/v1/backups/{id}/restoreGET /api/v1/registry/statusResponse:
{
"online": true,
"url": "http://localhost:5000",
"disk_usage": {
"bytes": 5368709120,
"human": "5.0 GB"
},
"image_count": 25
}GET /api/v1/registry/imagesPOST /api/v1/registry/cleanupRequest:
{
"keep_tags": 2,
"older_than_days": 30
}GET /api/v1/system/info
GET /api/v1/system/stats
GET /api/v1/system/temperature
POST /api/v1/system/reboot
POST /api/v1/system/shutdown| Code | HTTP Status | Description |
|---|---|---|
UNAUTHORIZED |
401 | Missing or invalid JWT |
FORBIDDEN |
403 | Insufficient permissions |
APP_NOT_FOUND |
404 | App does not exist |
PROFILE_NOT_FOUND |
404 | Profile does not exist |
MOUNT_NOT_FOUND |
404 | Mount does not exist |
APP_ALREADY_EXISTS |
409 | App with name already exists |
PORT_CONFLICT |
409 | Port already allocated |
SYSTEM_APP_PROTECTED |
403 | Cannot modify system app |
OFFLINE_IMAGE_UNAVAILABLE |
503 | Image not cached, offline |
VPN_CONNECTION_FAILED |
500 | VPN connection error |
MOUNT_FAILED |
500 | SMB/NFS mount error |
WIFI_CONNECTION_FAILED |
500 | WiFi connection error |
The following are deprecated and will be removed in v3.0:
| Deprecated | Replacement |
|---|---|
/api/v1/services/* |
/api/v1/apps/* |
/api/v1/appstore/* |
/api/v1/apps/* |
/api/v1/appmanager/* |
/api/v1/apps/* |
Document Version: 2.0
Last Updated: January 31, 2026