Skip to main content

Get VM Details

GET/v2.1/servers/{server_id}

To get detailed information about a specific virtual machine (VM), you can send a GET request to the /v2.1/servers/{server_id} endpoint of the compute service, replacing {server_id} with the actual ID of the VM you want to retrieve. This request requires an authentication token, which you should include in the request headers.

Request​

Body Parameters​

server_idstringrequired

The UUID of the server.

Sample Request​

curl -ks -H 'Content-Type: application/json' -H 'X-Auth-Token: gAAAAA<...>' \
https://api.vietnix.cloud:8774/v2.1/servers/{server_id}

Response​

Parameters​

serverobjectrequired

A server object.

idstringrequired

The UUID of the server.

linksarrayrequired

Links to the resources in question. See API Guide / Links and References for more info.

namestringrequired

The server name.

accessIPv4stringrequired

IPv4 address that should be used to access this server. May be automatically set by the provider.

accessIPv6stringrequired

IPv6 address that should be used to access this server. May be automatically set by the provider.

addressesobjectrequired

The addresses for the server. Servers with status BUILD hide their addresses information.

security_groupsarray

One or more security groups objects.

1 field
namestringrequiredbody

The security group name.

config_drivestringrequired

Indicates whether a config drive was used for this server. True or empty string (empty means False).

createdstringrequired

When the resource was created (ISO 8601, CCYY-MM-DDThh:mm:ss±hh:mm).

flavorobjectrequired

Before microversion 2.47: ID and links for the flavor (may be empty). As of 2.47: subset of the actual flavor info as a nested dictionary.

9 fields
idstringrequiredbody

The ID of the flavor. Available until version 2.46.

linksarrayrequiredbody

Links to the flavor resource. Available until version 2.46.

vcpusintegerrequiredbody

Number of vCPUs allocated to the server. New in 2.47.

ramintegerrequiredbody

RAM in MiB. New in 2.47.

diskintegerrequiredbody

Root disk size in GiB. New in 2.47.

ephemeralintegerrequiredbody

Ephemeral disk size in GiB. New in 2.47.

swapintegerrequiredbody

Swap disk size in MiB. New in 2.47.

original_namestringrequiredbody

Display name of the flavor. New in 2.47.

extra_specsobjectbody

Flavor extra-specs key/value pairs; included only if policy allows. New in 2.47.

2 fields
keystringrequiredbody

Extra spec key. New in 2.47.

valuestringrequiredbody

Extra spec value. New in 2.47.

guest_agentobjectrequired

The guest tools connection state and version.

hci_infoobjectrequired

Information about VM networks, disks, traits, and OS distribution.

hostIdstringrequired

Hashed host identifier, unique per project; useful to check colocation within a project.

host_statusstring

Host status: UP, UNKNOWN, DOWN, MAINTENANCE, or empty (no host). Appears only if policy permits. New in 2.16.

imageobjectrequired

UUID and links for the image. Empty string when booted from a volume.

image_metadataobject

Image metadata key/value pairs (max 255 bytes per key and per value).

key_namestringrequired

Name of the associated key pair, if any.

lockedbooleanrequired

True if the instance is locked; otherwise False. New in 2.9.

locked_reasonstringrequired

Reason behind locking a server. New in 2.73.

memory_mbintegerrequired

Memory of this hypervisor (MiB). Available until version 2.87.

metadataobjectrequired

Metadata key/value pairs (maintained for backward compatibility).

OS-DCF:diskConfigstringrequired

Disk configuration: AUTO or MANUAL.

OS-EXT-AZ:availability_zonestringrequired

Availability zone name (VHI returns default or null).

OS-EXT-SRV-ATTR:hoststringrequired

Compute host on which this instance is running (admin only).

OS-EXT-SRV-ATTR:hostnamestring

Hostname set on the instance (admin only). New in 2.3.

OS-EXT-SRV-ATTR:hypervisor_hostnamestringrequired

Hypervisor host name (Ironic: node UUID) (admin only).

OS-EXT-SRV-ATTR:instance_namestringrequired

Instance name generated by the template (admin only).

OS-EXT-SRV-ATTR:kernel_idstring

Kernel image UUID when using AMI; null otherwise (admin only). New in 2.3.

OS-EXT-SRV-ATTR:launch_indexinteger

Launch sequence index for multi-create (admin only). New in 2.3.

OS-EXT-SRV-ATTR:reservation_idstring

Reservation ID for the server (admin only). New in 2.3.

OS-EXT-SRV-ATTR:ramdisk_idstring

Ramdisk image UUID when using AMI; null otherwise (admin only). New in 2.3.

OS-EXT-SRV-ATTR:root_device_namestring

Root device name (admin only). New in 2.3.

OS-EXT-SRV-ATTR:user_datastring

user_data provided at create (admin only). New in 2.3.

OS-EXT-STS:power_stateintegerrequired

Power state: 0 NOSTATE, 1 RUNNING, 3 PAUSED, 4 SHUTDOWN, 6 CRASHED, 7 SUSPENDED, 8 SHUTDOWN_ACTIVE.

OS-EXT-STS:task_statestringrequired

Task state of the instance.

OS-EXT-STS:vm_statestringrequired

VM state.

os-extended-volumes:volumes_attachedarrayrequired

Attached volumes, if any.

2 fields
idstringrequiredbody

Attached volume ID.

delete_on_terminationbooleanrequiredbody

Whether the volume is deleted with the server (default False). New in 2.3.

OS-SRV-USG:launched_atstringrequired

When the server was launched (ISO 8601); null if not set.

OS-SRV-USG:terminated_atstringrequired

When the server was deleted (ISO 8601); null if not set.

descriptionstringrequired

Server description. New in 2.19.

server_groupsarrayrequired

UUIDs of server groups this server belongs to (max 1). New in 2.71.

tagsarrayrequired

List of tags (max 50). New in 2.26.

trusted_image_certificatesarrayrequired

Trusted certificate IDs used for image signature verification (max 50); null if not set. New in 2.63.

progressinteger

Percent progress when status is ACTIVE, BUILD, REBUILD, RESIZE, VERIFY_RESIZE, or MIGRATING.

statusstringrequired

Server status.

tenant_idstringrequired

UUID of the tenant (project).

updatedstringrequired

When the resource was updated (ISO 8601, CCYY-MM-DDThh:mm:ss±hh:mm).

user_idstringrequired

ID of the user who owns the server.

faultobject

Fault object; shown when status is ERROR or DELETED and a fault occurred.

4 fields
codeintegerrequiredbody

Error response code.

createdstringrequiredbody

When the exception was raised (ISO 8601).

messagestringrequiredbody

Error message.

detailsstringbody

Stack trace (available if response code is not 500 or you have admin privilege).

vcpu_modelobjectrequired

Description of the used virtual CPU model.

vcpusintegerrequired

Number of virtual CPUs the server uses.

Status Codes​

Success​

Status CodeDescription
200 - OKRequest was successful.

Error​

Status CodeDescription
401 - UnauthorizedUser must authenticate before making a request.
403 - ForbiddenPolicy does not allow current user to do this operation.
404 - Not FoundThe requested resource could not be found.

Sample Response​

Response body
{
"server": {
"id": "393210ad-152b-4ac3-a0f0-798ee4e93620",
"name": "Ubuntu22",
"status": "ACTIVE",
"tenant_id": "f33507157a634f1cac71e06a70fb558e",
"user_id": "64166c7effeb4a89b59c073588099640",
"metadata": {
"ha_enabled": "True"
},
"hostId": "8832df28df03a13573bd7478e79d31483ce42e75c8d1a291f2d9637a",
"image": "",
"flavor": {
"id": "dee219cf-cd93-41c1-bae7-0c9874a0cc31",
"links": [
{
"rel": "bookmark",
"href": "https://api.vietnix.cloud:8774/flavors/dee219cf-cd93-41c1-bae7-0c9874a0cc31"
}
]
},
"created": "2025-09-22T02:43:51Z",
"updated": "2025-09-22T02:44:00Z",
"addresses": {
"test01": [
{
"version": 4,
"addr": "192.168.0.75",
"OS-EXT-IPS:type": "fixed",
"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:26:de:79"
}
]
},
"accessIPv4": "",
"accessIPv6": "",
"links": [
{
"rel": "self",
"href": "https://api.vietnix.cloud:8774/v2.1/servers/393210ad-152b-4ac3-a0f0-798ee4e93620"
},
{
"rel": "bookmark",
"href": "https://api.vietnix.cloud:8774/servers/393210ad-152b-4ac3-a0f0-798ee4e93620"
}
],
"OS-DCF:diskConfig": "MANUAL",
"progress": 0,
"OS-EXT-AZ:availability_zone": "nova",
"config_drive": "",
"key_name": "Docs Writter",
"OS-SRV-USG:launched_at": "2025-09-22T02:43:59.000000",
"OS-SRV-USG:terminated_at": null,
"security_groups": [
{
"name": "default"
}
],
"OS-EXT-STS:task_state": null,
"OS-EXT-STS:vm_state": "active",
"OS-EXT-STS:power_state": 1,
"OS-EXT-STS:power_state_reason": "unpaused",
"os-extended-volumes:volumes_attached": [
{
"id": "75a55d31-a6dc-48a2-82e2-3d6ac0f8a2bc",
"size": 10
}
],
"vcpu_model": {
"arch": null,
"vendor": null,
"topology": {
"nova_object.name": "VirtCPUTopology",
"nova_object.namespace": "nova",
"nova_object.version": "1.0",
"nova_object.data": {
"sockets": 1,
"cores": 2,
"threads": 1
},
"nova_object.changes": [
"threads",
"sockets",
"cores"
]
},
"features": [],
"mode": "host-model",
"model": null,
"match": "exact"
},
"image_metadata": {
"image_validated": "yes",
"os_distro": "ubuntu22.04",
"hci_allow_set_password": "True",
"os_admin_user": "root",
"min_ram": "0",
"min_disk": "10",
"disk_format": "qcow2",
"container_format": "bare",
"base_image_ref": "41ecdf81-c112-4231-9fea-049e70f3b564",
"hw_machine_type": "pc-q35-vz9.0.0",
"hw_vif_multiqueue_enabled": "True"
},
"required_traits": [],
"hci_info": {
"network": [
{
"mac": "fa:16:3e:26:de:79",
"emulation_type": "virtio",
"ips": [
"192.168.0.75"
],
"network": {
"id": "8ae2b710-ad3d-469e-a75a-c3e203887d2e",
"bridge": "br-int",
"label": "test01",
"subnets": [
{
"cidr": "192.168.0.0/24",
"dns": [
{
"address": "8.8.8.8",
"type": "dns",
"version": 4,
"meta": {}
}
],
"gateway": {
"address": "192.168.0.1",
"type": "gateway",
"version": 4,
"meta": {}
},
"ips": [
{
"address": "192.168.0.75",
"type": "fixed",
"version": 4,
"meta": {},
"floating_ips": []
}
],
"routes": [],
"version": 4,
"meta": {
"dhcp_server": "192.168.0.2"
}
}
],
"meta": {
"injected": true,
"tenant_id": "f33507157a634f1cac71e06a70fb558e",
"mtu": 8913,
"physical_network": null,
"tunneled": true
}
},
"port_security_enabled": true
}
],
"boot_order": [
"hd"
],
"vzhardware": "2.0.1",
"max_mem": null,
"max_vcpu": null,
"has_pci_devices": false
},
"memory_mb": 2048,
"vcpus": 2,
"root_gb": 0,
"guest_agent": {
"status": "connected",
"version": "7.22-1.vz7"
},
"username": "root",
"allow_set_password": true
}
}