---
title: "Show all hosts list in EM"
method: GET
path: "/resources/hosts"
tags: ["resource"]
---

# Show all hosts list in EM

`GET /resources/hosts`

get hosts list

## Query parameters

- `arch` string
- `clusterType` string
- `hostDiskType` string
- `hostId` string
- `hostIp` string
- `hostName` string
- `loadStat` string
- `page` integer
- `pageSize` integer
- `purpose` string
- `rack` string
- `region` string
- `status` string
- `zone` string

## Response `200`

OK

- object
  - `code` integer
  - `data` object
    - `hosts` StructsHostInfo[]
      - `arch` string — x86 or arm64
      - `availableDiskCount` integer — available disk count which could be used for allocation
      - `az` string
      - `clusterType` string — What cluster is the host used for? [database/data migration]
      - `cpuCores` integer — Host cpu cores spec, init while importing
      - `createTime` integer
      - `diskType` string — Disk type of this host [SATA/SSD/NVMeSSD]
      - `disks` StructsDiskInfo[]
        - `capacity` integer — Disk size, Unit: GB
        - `diskId` string
        - `hostId` string
        - `name` string — [sda/sdb/nvmep0...]
        - `path` string — Disk mount path: [/data1]
        - `status` string — Disk Status, 0 for available, 1 for inused
        - `type` string — Disk type: [nvme-ssd/ssd/sata]
      - `hostId` string
      - `hostName` string
      - `instances` object
      - `ip` string
      - `kernel` string
      - `loadStat` string — Host load stat, Loadless, Inused, Exhaust, etc
      - `memory` integer — Host memory, init while importing
      - `nic` string — Host network type: 1GE or 10GE
      - `os` string
      - `passwd` string
      - `purpose` string — What Purpose is the host used for? [compute/storage/schedule]
      - `rack` string
      - `region` string
      - `reserved` boolean — Whether this host is reserved - will not be allocated
      - `spec` string — Host Spec, init while importing
      - `sshPort` integer
      - `status` string — Host status, Online, Offline, Failed, Deleted, etc
      - `sysLabels` string[]
      - `traits` integer — Traits of labels
      - `updateTime` integer
      - `usedCpuCores` integer — Unused CpuCore, used for allocation
      - `usedMemory` integer — Unused memory size, Unit:GiB, used for allocation
      - `userName` string
      - `vendor` string
  - `message` string
  - `page` ControllerPage
    - `page` integer
    - `pageSize` integer
    - `total` integer

---

[API](https://skmtc.net/pingcap/apis/em-ui-api.md) · [All operations](https://skmtc.net/pingcap/apis/em-ui-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pingcap/em-ui-api/versions/631e4b26b7e8/schema)
