---
title: "Get a list of Hosts"
method: POST
path: "/hosts/list"
tags: ["hosts"]
---

# Get a list of Hosts

`POST /hosts/list`

This operation gets a list of Hosts, allowing for sorting and pagination. Note: Entities that have not been created successfully are not listed.

## Request body

- HostListMetadata — All api calls that return a list will have this metadata block as input
  - `filter` string — The filter in FIQL syntax used for the results.
  - `kind` string — The kind name
  - `sort_order` string — The sort order in which results are returned
  - `offset` integer — Offset from the start of the entity list
  - `length` integer — The number of records to retrieve relative to the offset
  - `sort_attribute` string — The attribute to perform sort on

## Response `200`

Success

- HostListIntentResponse — Response object for intentful operation of hosts
  - `entities` HostIntentResource[]
    - `status` HostDefStatus — Host Status definition.
      - `state` string — The state of the entity
      - `message_list` MessageResource[]
        - `message` string, required — If state is ERROR, a message describing the error.
        - `reason` string, required — If state is ERROR, a machine-readable snake-cased string.
        - `details` object — Custom key-value details relevant to the status.
      - `name` string — Host Name.
      - `resources` object, required — Host resources.
        - `gpu_driver_version` string — Host GPU driver version.
        - `failover_cluster` FailoverCluster — Hyper-V failover cluster.
          - `ip` string — IP address of the failover cluster.
          - `name` string — Name of the failover cluster.
          - `domain_credential` Credentials, required — Credentials to login server
            - `username` string, required
            - `password` string
        - `ipmi` Ipmi — Host IPMI info.
          - `ip` string, required — IPMI IP address.
        - `cpu_model` string — Host CPU model.
        - `host_nics_id_list` string[] — Host NICs.
        - `num_cpu_sockets` integer — Number of CPU sockets.
        - `windows_domain` WindowsDomain — Hyper-V node domain.
          - `name` string — The name of the node to be renamed to during domain-join. If not given,a new name will be automatically assigned.
          - `name_server_ip` string — The ip of name server that can resolve the domain name. Required during joining domain.
          - `organization_unit_path` string — Path to organization unit in the domain.
          - `name_prefix` string — The name prefix in the domain in case of CPS deployment.
          - `domain_name` string — Full name of domain.
          - `domain_credential` Credentials, required — Credentials to login server
            - `username` string, required
            - `password` string
        - `gpu_list` HostGpu[] — List of GPUs on the host.
          - `status` string — Current status of the physical GPU.
          - `vendor` string — The vendor of the GPU.
          - `num_virtual_display_heads` integer — Number of supported virtual display heads.
          - `assignable` boolean — Whether this vGPU instance can be allocated to a VM.
          - `license_list` string[] — List of license types associated with this GPU.
          - `num_vgpus_allocated` integer — The number of vGPU instances allocated for this physical GPU resource.
          - `pci_address` string — GPU {segment:bus:device:function} (sbdf) address.
          - `name` string — Name of the host GPU.
          - `frame_buffer_size_mib` integer — GPU frame buffer size in MiB.
          - `index` integer — The index of the vGPU within physical GPU resource.
          - `uuid` string, UUID — UUID of the GPU.
          - `numa_node` integer — NUMA node this GPU belongs to.
          - `max_resolution` string — Maximum resolution per display head.
          - `consumer_reference` Reference — Reference to a kind
            - `kind` string, required
            - `uuid` string, UUID, required
            - `name` string
          - `mode` string — The type of this GPU.
          - `fraction` integer — Fraction of the physical GPU.
          - `guest_driver_version` string — Last determined guest driver version.
          - `device_id` integer — The device ID of the GPU.
        - `serial_number` string — Node serial number.
        - `cpu_capacity_hz` integer — Host CPU capacity.
        - `memory_capacity_mib` integer — Host memory capacity in MiB.
        - `host_disks_reference_list` DiskReference[]
          - `kind` string, required — The kind name
          - `name` string
          - `uuid` string, UUID, required
        - `monitoring_state` string — Host monitoring status.
        - `hypervisor` Hypervisor — Host Hypervisor information.
          - `num_vms` integer — Num of VMs running on this Host.
          - `ip` string, required — Hypervisor IP.
          - `hypervisor_full_name` string — Full name of hypervisor running on Host.
        - `host_type` string — Host type.
        - `num_cpu_cores` integer — Number of CPU cores on Host.
        - `rackable_unit_reference` RackableUnitReference — The reference to a rackable_unit
          - `kind` string, required — The kind name
          - `name` string
          - `uuid` string, UUID, required
        - `controller_vm` ControllerVm — Host controller vm information.
          - `ip` string, required — Controller VM IP address.
          - `nat_ip` string — Controller VM NAT IP address.
          - `oplog_usage` OplogUsage — oplog disk usage.
            - `oplog_disk_pct` number, float — Oplog disk size used in percentage.
            - `oplog_disk_size` integer — Size of oplog disk in bytes.
          - `nat_port` integer — Controller VM NAT port.
        - `block` Block — Host block config info.
          - `block_serial_number` string — Rackable unit serial number.
          - `block_model` string — Rackable unit model name.
      - `cluster_reference` Reference — Reference to a kind
        - `kind` string, required
        - `uuid` string, UUID, required
        - `name` string
    - `spec` Host — Host Definition.
      - `name` string — Host Name.
      - `resources` object, required — Host resources.
        - `windows_domain` WindowsDomain — Hyper-V node domain.
          - `name` string — The name of the node to be renamed to during domain-join. If not given,a new name will be automatically assigned.
          - `name_server_ip` string — The ip of name server that can resolve the domain name. Required during joining domain.
          - `organization_unit_path` string — Path to organization unit in the domain.
          - `name_prefix` string — The name prefix in the domain in case of CPS deployment.
          - `domain_name` string — Full name of domain.
          - `domain_credential` Credentials, required — Credentials to login server
            - `username` string, required
            - `password` string
        - `controller_vm` ControllerVm — Host controller vm information.
          - `ip` string, required — Controller VM IP address.
          - `nat_ip` string — Controller VM NAT IP address.
          - `oplog_usage` OplogUsage — oplog disk usage.
            - `oplog_disk_pct` number, float — Oplog disk size used in percentage.
            - `oplog_disk_size` integer — Size of oplog disk in bytes.
          - `nat_port` integer — Controller VM NAT port.
        - `failover_cluster` FailoverCluster — Hyper-V failover cluster.
          - `ip` string — IP address of the failover cluster.
          - `name` string — Name of the failover cluster.
          - `domain_credential` Credentials, required — Credentials to login server
            - `username` string, required
            - `password` string
    - `api_version` string
    - `metadata` HostMetadata, required — The host kind metadata
      - `last_update_time` string, date-time — UTC date and time in RFC-3339 format when host was last updated
      - `kind` string, required — The kind name
      - `uuid` string, UUID — host uuid
      - `spec_version` integer — Version number of the latest spec.
      - `creation_time` string, date-time — UTC date and time in RFC-3339 format when host was created
      - `spec_hash` string — Hash of the spec. This will be returned from server.
      - `should_force_translate` boolean — Applied on Prism Central only. Indicate whether force to translate the spec of the fanout request to fit the target cluster API schema.
      - `owner_reference` UserReference — The reference to a user
        - `kind` string, required — The kind name
        - `name` string
        - `uuid` string, UUID, required
      - `categories` object — Categories for the host
      - `name` string — host name
  - `api_version` string, required
  - `metadata` HostListMetadataOutput, required — All api calls that return a list will have this metadata block
    - `filter` string — The filter used for the results
    - `kind` string — The kind name
    - `sort_order` string — The sort order in which results are returned
    - `offset` integer — Offset from the start of the entity list
    - `total_matches` integer — Total matches found
    - `length` integer — The number of records retrieved relative to the offset
    - `sort_attribute` string — The attribute to perform sort on

## Other responses

- `default` — Internal Error

---

[API](https://skmtc.net/nutanix/apis/nutanix-intentful-api.md) · [All operations](https://skmtc.net/nutanix/apis/nutanix-intentful-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nutanix/nutanix-intentful-api/revisions/40395083ab31/schema)
