Complete list of all API endpoints available in HyperSDK with integration to hyper2kvm.
http://localhost:8080
GET /health - Health checkGET /status - Daemon statusGET /capabilities - System capabilitiesPOST /jobs/submit - Submit new export jobGET /jobs/query - Query jobs (supports ?all=true, ?id=xxx, ?status=running)POST /jobs/cancel - Cancel running jobsGET /jobs/{id} - Get specific job detailsGET /vms/list?server=...&username=...&password=...&insecure=true - List VMs from vCenterGET /vms/info?path=/datacenter/vm/myvm - Get VM infoPOST /vms/shutdown - Shutdown VM gracefullyPOST /vms/poweroff - Power off VMPOST /vms/remove-cdrom - Remove CD-ROM from VMGET /schedules/list - List all scheduled jobsPOST /schedules/create - Create new schedule
{
"name": "Daily Backup",
"cron_expr": "0 2 * * *",
"job_template": "backup-template-1"
}
GET /backup-policies/list - List backup policiesPOST /backup-policies/create - Create backup policy
{
"name": "Production Backup",
"frequency": "daily",
"retention": 30,
"target_tags": ["production", "critical"]
}
GET /workflows/list - List all workflowsGET /users/list - List all usersPOST /users/create - Create new user
{
"username": "operator2",
"email": "operator2@example.com",
"role": "operator"
}
GET /roles/list - List all roles (Admin, Operator, Viewer, Auditor)GET /api-keys/list - List all API keysPOST /api-keys/generate - Generate new API key
{
"name": "Production API"
}
GET /sessions/list - List active user sessionsGET /notifications/config - Get notification configurationPUT /notifications/update - Update notification config
{
"email": {
"enabled": true,
"smtp_server": "smtp.gmail.com",
"port": 587,
"on_completion": true,
"on_failure": true
},
"slack": {
"enabled": true,
"webhook_url": "https://hooks.slack.com/...",
"channel": "#alerts"
}
}
GET /alert-rules/list - List all alert rulesPOST /alert-rules/create - Create alert rule
{
"name": "Storage Almost Full",
"condition": "storage_usage",
"threshold": 90,
"actions": ["email", "slack"]
}
POST /webhooks/test - Test webhook configuration
{
"url": "https://example.com/webhook",
"headers": {
"Authorization": "Bearer token123"
}
}
POST /convert/vm - Convert VM using hyper2kvm
{
"source_path": "/vmfs/volumes/datastore1/vm1/vm1.vmdk",
"dest_path": "/var/lib/libvirt/images/vm1.qcow2",
"format": "qcow2",
"compression": "gzip",
"vcenter_creds": {
"server": "vcenter.example.com",
"username": "administrator@vsphere.local",
"password": "password",
"insecure": true
}
}
GET /convert/list - List conversion jobsGET /convert/status?id=conv-123 - Get conversion statusPOST /import/kvm - Import VM to KVM/libvirt
{
"image_path": "/var/lib/libvirt/images/vm1.qcow2",
"vm_name": "imported-vm-1",
"memory": 2048,
"cpus": 2,
"network": "default"
}
GET /vmdk/parse?path=/path/to/disk.vmdk - Parse VMDK fileGET /cost/summary - Get cost summary
{
"current_month": 2450.00,
"last_month": 1890.00,
"change": 560.00,
"change_percent": 29.6,
"annual_projected": 28500.00,
"breakdown": {
"storage": 1200.00,
"network": 850.00,
"compute": 400.00
}
}
GET /cost/history - Get cost historyGET /budget/config - Get budget configurationPUT /budget/update - Update budget
{
"monthly_budget": 3000.00,
"alert_threshold": 80.0
}
GET /tags/list - List all tagsPOST /tags/create - Create tag
{
"name": "production",
"category": "environment",
"color": "green"
}
GET /collections/list - List VM collectionsPOST /collections/create - Create collection
{
"name": "Production Web Servers",
"description": "All production web servers",
"vm_ids": ["vm-1", "vm-2", "vm-3"]
}
GET /searches/list - List saved searchesPOST /searches/create - Save search query
{
"name": "Production Windows VMs",
"query": "tags:production AND os:windows"
}
GET /cloud/providers/list - List cloud providers (AWS, Azure, GCP)POST /cloud/providers/configure - Configure cloud provider
{
"name": "aws",
"enabled": true,
"config": {
"aws": {
"access_key_id": "AKIAIOSFODNN7EXAMPLE",
"secret_access_key": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",
"region": "us-east-1",
"s3_bucket": "hypersdk-exports"
}
}
}
GET /vcenter/servers/list - List all vCenter serversPOST /vcenter/servers/add - Add vCenter server
{
"name": "Production vCenter",
"hostname": "vcenter-prod.example.com",
"username": "administrator@vsphere.local",
"password": "password",
"insecure": true
}
GET /integrations/list - List integrations (Jenkins, Ansible, Terraform, Grafana)POST /integrations/configure - Configure integration
{
"name": "Jenkins CI/CD",
"type": "jenkins",
"enabled": true,
"config": {
"url": "https://jenkins.example.com",
"token": "jenkins-api-token"
}
}
GET /encryption/config - Get encryption configurationPUT /encryption/update - Update encryption settings
{
"at_rest": {
"enabled": true,
"algorithm": "AES-256"
},
"in_transit": {
"require_tls13": true,
"verify_ssl_certs": true
},
"key_management": {
"storage": "vault",
"vault_url": "https://vault.example.com"
}
}
GET /compliance/frameworks - List compliance frameworks (GDPR, SOC2, HIPAA)GET /audit/logs - Get audit logs (supports filtering)GET /audit/export - Export audit logs as CSVGET /migration/wizard - Get wizard statePOST /migration/wizard - Update wizard state
{
"step": 1,
"source": {
"type": "vmware",
"server": "vcenter.example.com"
},
"destination": {
"type": "kvm",
"location": "/var/lib/libvirt/images"
},
"vms": ["web-server-01", "db-server-01"]
}
POST /migration/compatibility - Run compatibility check
{
"vm_id": "vm-123",
"platform": "kvm"
}
POST /migration/rollback - Rollback failed migration
{
"vm_id": "vm-123",
"backup_id": "backup-456"
}
curl http://localhost:8080/health
curl "http://localhost:8080/vms/list?server=vcenter.example.com&username=admin@vsphere.local&password=secret&insecure=true"
curl -X POST http://localhost:8080/convert/vm \
-H "Content-Type: application/json" \
-d '{
"source_path": "/vmfs/volumes/datastore1/vm1/vm1.vmdk",
"dest_path": "/var/lib/libvirt/images/vm1.qcow2",
"format": "qcow2",
"compression": "gzip"
}'
curl -X POST http://localhost:8080/import/kvm \
-H "Content-Type: application/json" \
-d '{
"image_path": "/var/lib/libvirt/images/vm1.qcow2",
"vm_name": "imported-vm-1",
"memory": 2048,
"cpus": 2,
"network": "default"
}'
curl -X POST http://localhost:8080/schedules/create \
-H "Content-Type: application/json" \
-d '{
"name": "Nightly Backup",
"cron_expr": "0 1 * * *"
}'
All endpoints return JSON responses with the following structure:
{
"status": "success",
"data": { ... }
}
{
"error": "Error message description"
}
200 OK - Request succeeded201 Created - Resource created400 Bad Request - Invalid request404 Not Found - Resource not found405 Method Not Allowed - Wrong HTTP method500 Internal Server Error - Server errorThe API integrates with the hyper2kvm Python tool located at /home/ssahani/tt/hyper2kvm/.
/convert/vm with source VMDK path/import/kvm to import to libvirtAll conversion and import operations return detailed error messages:
{
"error": "conversion failed: disk not found - /path/to/disk.vmdk"
}
Check logs for detailed Python traceback if conversion fails.