VPS: Virtual machine

Get virtual machines

Retrieve all available virtual machines.

Use this endpoint to view available VPS instances.

get/api/vps/v1/virtual-machines

Request

  • Base URL: https://developers.hostinger.com
  • URL: https://developers.hostinger.com/api/vps/v1/virtual-machines
  • Auth: HTTP bearer

Response

Success response

idinteger

Virtual machine ID

firewall_group_idinteger nullable

Active firewall ID, null if disabled

subscription_idstring nullable

Subscription ID

data_center_idinteger nullable

Data center ID

planstring nullable

VPS plan name

hostnamestring
state'running' | 'starting' | 'stopping' | 'stopped' | 'creating' | 'initial' | 'error' | 'suspending' | 'unsuspending' | 'suspended' | 'destroying' | 'destroyed' | 'recreating' | 'restoring' | 'recovery' | 'stopping_recovery'
actions_lock'unlocked' | 'locked'
cpusinteger

CPUs count assigned to virtual machine

memoryinteger

Memory available to virtual machine (in megabytes)

diskinteger

Virtual machine disk size (in megabytes)

bandwidthinteger

Monthly internet traffic available to virtual machine (in megabytes)

ns1string nullable

Primary DNS resolver

ns2string nullable

Secondary DNS resolver

created_atstring date-time

Example response

[
  {
    "id": 17923,
    "subscription_id": "Azz353Uhl1xC54pR0",
    "data_center_id": 521,
    "plan": "KVM 4",
    "hostname": "srv17923.hstgr.cloud",
    "state": "running",
    "actions_lock": "unlocked",
    "cpus": 4,
    "memory": 8192,
    "disk": 51200,
    "bandwidth": 1073741824,
    "ns1": "1.1.1.1",
    "ns2": "8.8.8.8",
    "ipv4": [
      {
        "id": 52347,
        "address": "213.331.273.15",
        "ptr": "something.domain.tld"
      }
    ],
    "ipv6": [
      {
        "id": 52347,
        "address": "213.331.273.15",
        "ptr": "something.domain.tld"
      }
    ],
    "template": {
      "id": 6523,
      "name": "Ubuntu 20.04 LTS",
      "description": "Ubuntu 20.04 LTS",
      "documentation": "https://docs.ubuntu.com"
    },
    "created_at": "2024-09-05T07:25:36.00000Z"
  }
]

Changes

No recorded changes to this operation across all 130 revisions of this API.