Skip to content

List VM Instances ​

Retrieves a list of your current virtual machines, offering comprehensive details for each, such as hardware configuration, ID, operating system, operational status, and more.

HTTP Request ​

GET {API_URL}virtual-machines

Query string parameters ​

ParametersRequirementsTypeDescription
limitOptionalintThe number of items to return
offsetOptionalintThe number of items to skip before starting to collect the result set
sortFieldOptionalstringThe field by which the data will be ordered
sortOrderOptionalstringSorting order: desc、asc
filtersOptionalstringStringified array of filter objects. eg: [{"key":"name","op":"contains","val":"hub"}]

Reponse Attributes ​

status boolean ​

Indicates the result of the request to retrieve a list of VMs. true signifies success, while false indicates an error.

message string ​

A description of the status of the request.

total int ​

Total records count

data object ​

An array of instances objects, each containing details about a VM.

For descriptions of the fields within the instances object returned in response to your request, please refer to the documentation here.

Example ​

Request ​

curl -X GET '{API_URL}virtual-machines' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'refresh-token: {REFRESH_TOKEN}' \
-H 'Content-Type: application/json'

Response ​

{
    "status": true,
    "message": "Getting virtual machines successful",
    "total": 1,
    "data": [
        {
            "id": "66bd5a1299f01e419f5ad5bc",
            "name": "VM-dhSqf5qh",
            "status": "running",
            "login": {
                "_id": "66bd5a1299f01e419f5ad5bd",
                "ssh_key": {
                    "id": "66bd5a0799f01e419f5ad5b6",
                    "name": "sshkey"
                },
                "password": "password",
                "username": "username"
            },
            "fixed_ip": "*.*.*.*",
            "started_time": 1723685402,
            "flavor": {
                "name": "1 x RTX4090",
                "cpu": 16,
                "ram": 32,
                "disk": 250,
                "gpu": "RTX4090",
                "gpu_count": 1
            },
            "image": {
                "name": "Ubuntu-22.04"
            },
            "region": {
                "name": "DALLAS"
            }
        }
    ]
}