Vps

Virtual Machine Management

Control and monitor your virtual machines with these management endpoints.

Virtual Machine Management

Control and monitor your virtual machines with these management endpoints.

VM Status

GET /projects/{project}/products/{product}/vps/status

Get real-time status and resource usage for a virtual machine.

Path Parameters

NameTypeDescription
projectstringUnique project identifier
productstringUnique product/VM identifier

Headers

NameTypeDescription
AuthorizationstringBearer token for authentication
PermissionstringREAD_VPS

Response

200 - Success

{
  "qemu": {
    "agent": true,
    "version": "7.2.0"
  },
  "status": "running",
  "uptime": "86400s",
  "cpu": 15.5,
  "cpus": 1,
  "memory": {
    "usedMB": 512,
    "total": 1024,
    "percent": 50.0
  },
  "disk": 5000000000,
  "maxdisk": 25000000000
}

VM Controls

POST /projects/{project}/products/{product}/vps/control

Control the power state of your virtual machine.

Path Parameters

NameTypeDescription
projectstringUnique project identifier
productstringUnique product/VM identifier

Headers

NameTypeDescription
AuthorizationstringBearer token for authentication
PermissionstringVPS_CONTROL

Request Body

NameTypeDescription
actionstringControl action (start, stop, kill, reboot)

Available Actions:

  • start - Start the VM
  • stop - Gracefully shutdown the VM
  • kill - Force stop the VM immediately
  • reboot - Restart the VM

Example Request:

{
  "action": "start"
}

Response

200 - Success

{
  "success": true,
  "action": {
    "uid": "action_abc123",
    "command": "start",
    "created": "2025-01-15T10:30:00Z",
    "finished": "2025-01-15T10:30:30Z"
  }
}

400 - Invalid State

{
  "error": "Error, vps is already online."
}

Console Access

GET /projects/{project}/products/{product}/vps/console

Get VNC console access credentials for direct VM access.

Path Parameters

NameTypeDescription
projectstringUnique project identifier
productstringUnique product/VM identifier

Headers

NameTypeDescription
AuthorizationstringBearer token for authentication
PermissionstringCONSOLE_VNC

Response

200 - Success

{
  "success": true,
  "ticket": "action_abc123",
  "secret": "vnc_secret_token_xyz789"
}

Default Credentials

GET /projects/{project}/products/{product}/vps/defaultlogin

Retrieve the default login credentials for a newly created VM (if available).

ℹ️ Note: Default credentials are only available for a limited time after VM creation for security purposes.

Path Parameters

NameTypeDescription
projectstringUnique project identifier
productstringUnique product/VM identifier

Headers

NameTypeDescription
AuthorizationstringBearer token for authentication

Response

200 - Success

{
  "type": "linux",
  "ipv4": "192.121.119.100",
  "protocol": "ssh",
  "username": "ubuntu", 
  "password": "GeneratedPassword123!"
}

400 - Not Available

{
  "error": "Default password no longer available"
}

Clear Default Credentials

POST /projects/{project}/products/{product}/vps/defaultlogin

Clear the stored default credentials for security purposes.

Path Parameters

NameTypeDescription
projectstringUnique project identifier
productstringUnique product/VM identifier

Headers

NameTypeDescription
AuthorizationstringBearer token for authentication

Response

200 - Success

{
  "success": true
}