Skip to main content

Host

2.11.1 Add Host​

API endpoint

POST /NSphere/api/host-resource

API description

Request Content-Type

application/json

Response Content-Type

application/json

Request example

{
"ip": "",
"pwd": "",
"clusterId": null,
"secretLevel": null,
"hostPoolId": 0,
"enableHA": 0,
"ignore": true
}

Request parameters

Parameter name

Description

Location

Required

Type

schema

apiAddHostDTO

ApiAddHostDTO

body

true

ApiAddHostDTO

ApiAddHostDTO

ip

Host IP address

true

string

pwd

Password to access the host

true

string

clusterId

Cluster ID

false

integer(int64)

secretLevel

Confidentiality level. Default value 1 (1: internal, 2: secret, 3: confidential, 4: top secret). If confidentiality mode is enabled, this must not be set to 1 when adding a host inside a secure area.

false

integer(int32)

hostPoolId

Data center ID

true

integer(int64)

enableHA

Whether HA is enabled. 0: not enabled, 1: enabled

true

integer(int32)

ignore

Whether to ignore duplicate management. false: the host cannot be added when already managed by another system. true: the host can still be added when already managed by another system.

true

boolean

Response status

Status code

Description

schema

200

OK

ApiResponseApiTaskMsgVO

Response parameters

Parameter name

Description

Type

schema

state

Status code. 0: success, 1: failure, 2: partial success

integer(int32)

integer(int32)

errorCode

Error code. Non-zero indicates a business error occurred.

integer(int32)

integer(int32)

successMessage

Success message

string

failureMessage

Error message. Valid on failure or partial success.

string

data

Response data. If the status code is 0, normal data is returned; if non-zero and non-empty, it contains data necessary to explain the exception.

ApiTaskMsgVO

ApiTaskMsgVO

msgId

Message ID. Can be used to query task progress.

integer(int64)

targetId

ID of the object the task is executed against

integer(int64)

targetName

Name of the object the task is executed against

string

Response example

{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": {
"msgId": 0,
"targetId": null,
"targetName": null
}
}

2.11.2 Modify Host Password​

API endpoint

PUT /NSphere/api/host-resource/{id}

API description

Request Content-Type

application/json

Response Content-Type

application/json

Request example

{
"pwd": ""
}

Request parameters

Parameter name

Description

Location

Required

Type

schema

id

Host ID

path

true

integer(int64)

apiModifyHostDTO

ApiModifyHostDTO

body

true

ApiModifyHostDTO

ApiModifyHostDTO

pwd

New password for the host backend. The password must contain uppercase letters, lowercase letters, digits, and special characters, and must not contain consecutive natural numbers, &/|`;$()<>, spaces, Chinese characters, single quotes, or double quotes. Minimum length 12, maximum length 32.

true

string

Response status

Status code

Description

schema

200

OK

ApiResponseVoid

Response parameters

Parameter name

Description

Type

schema

state

Status code. 0: success, 1: failure, 2: partial success

integer(int32)

integer(int32)

errorCode

Error code. Non-zero indicates a business error occurred.

integer(int32)

integer(int32)

successMessage

Success message

string

failureMessage

Error message. Valid on failure or partial success.

string

data

Response data. If the status code is 0, normal data is returned; if non-zero and non-empty, it contains data necessary to explain the exception.

string

Response example

{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": {}
}

2.11.3 Delete Host​

API endpoint

DELETE /NSphere/api/host-resource/{id}

API description

Request Content-Type

application/x-www-form-urlencoded

Response Content-Type

application/json

Request parameters

Parameter name

Description

Location

Required

Type

schema

id

Host ID

path

true

integer(int64)

Response status

Status code

Description

schema

200

OK

ApiResponseApiTaskMsgVO

Response parameters

Parameter name

Description

Type

schema

state

Status code. 0: success, 1: failure, 2: partial success

integer(int32)

integer(int32)

errorCode

Error code. Non-zero indicates a business error occurred.

integer(int32)

integer(int32)

successMessage

Success message

string

failureMessage

Error message. Valid on failure or partial success.

string

data

Response data. If the status code is 0, normal data is returned; if non-zero and non-empty, it contains data necessary to explain the exception.

ApiTaskMsgVO

ApiTaskMsgVO

msgId

Message ID. Can be used to query task progress.

integer(int64)

targetId

ID of the object the task is executed against

integer(int64)

targetName

Name of the object the task is executed against

string

Response example

{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": {
"msgId": 0,
"targetId": null,
"targetName": null
}
}

2.11.4 Connect Host​

API endpoint

PUT /NSphere/api/host-resource/connect/{id}

API description

Request Content-Type

application/x-www-form-urlencoded

Response Content-Type

application/json

Request parameters

Parameter name

Description

Location

Required

Type

schema

id

Host ID

path

true

integer(int64)

Response status

Status code

Description

schema

200

OK

ApiResponseApiTaskMsgVO

Response parameters

Parameter name

Description

Type

schema

state

Status code. 0: success, 1: failure, 2: partial success

integer(int32)

integer(int32)

errorCode

Error code. Non-zero indicates a business error occurred.

integer(int32)

integer(int32)

successMessage

Success message

string

failureMessage

Error message. Valid on failure or partial success.

string

data

Response data. If the status code is 0, normal data is returned; if non-zero and non-empty, it contains data necessary to explain the exception.

ApiTaskMsgVO

ApiTaskMsgVO

msgId

Message ID. Can be used to query task progress.

integer(int64)

targetId

ID of the object the task is executed against

integer(int64)

targetName

Name of the object the task is executed against

string

Response example

{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": {
"msgId": 0,
"targetId": null,
"targetName": null
}
}

2.11.5 Query CVK Information​

API endpoint

GET /NSphere/api/host-resource/cvk/info

API description

Query CVK information. New API in the E0930 release.

Request Content-Type

application/x-www-form-urlencoded

Response Content-Type

application/json

Request parameters

Parameter name

Description

Location

Required

Type

schema

hpId

Data center ID.

query

false

integer(int64)

clusterId

Cluster ID.

query

false

integer(int64)

hostId

Host ID.

query

false

integer(int64)

Response status

Status code

Description

schema

200

OK

ApiResponseListApiCvkInfoVO

Response parameters

Parameter name

Description

Type

schema

state

Status code. 0: success, 1: failure, 2: partial success

integer(int32)

integer(int32)

errorCode

Error code. Non-zero indicates a business error occurred.

integer(int32)

integer(int32)

successMessage

Success message

string

failureMessage

Error message. Valid on failure or partial success.

string

data

Response data. If the status code is 0, normal data is returned; if non-zero and non-empty, it contains data necessary to explain the exception.

array

ApiCvkInfoVO

ntpStatus

NTP status (running, not running).

string

id

Host ID.

integer(int64)

name

Host name.

string

hostProcess

Host process information.

ApiHostProcessVO

ApiHostProcessVO

ovsdbServerNum

Number of ovsdb server processes.

string

nsphereserverNum

Number of Nsphereserver processes.

string

ovsVswitchdNum

Number of Ovs-vswitchd processes.

string

libvirtNum

Number of Libvirt processes.

string

Response example

{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": [
{
"ntpStatus": null,
"id": null,
"name": null,
"hostProcess": {
"ovsdbServerNum": null,
"nsphereserverNum": null,
"ovsVswitchdNum": null,
"libvirtNum": null
}
}
]
}

2.11.6 Query Management Platform Information​

API endpoint

GET /NSphere/api/host-resource/cvm/info

API description

Query management platform information. New API in the E0930 release.

Request Content-Type

application/x-www-form-urlencoded

Response Content-Type

application/json

Request parameters

Parameter name

Description

Location

Required

Type

schema

None

Response status

Status code

Description

schema

200

OK

ApiResponseApiCvmInfoVO

Response parameters

Parameter name

Description

Type

schema

state

Status code. 0: success, 1: failure, 2: partial success

integer(int32)

integer(int32)

errorCode

Error code. Non-zero indicates a business error occurred.

integer(int32)

integer(int32)

successMessage

Success message

string

failureMessage

Error message. Valid on failure or partial success.

string

data

Response data. If the status code is 0, normal data is returned; if non-zero and non-empty, it contains data necessary to explain the exception.

ApiCvmInfoVO

ApiCvmInfoVO

failOverStatus

Failover status (normal, offline, syncing, abnormal, error — unknown error, non failover config — no failover configuration).

string

cvmHaNum

Number of management platform HA processes.

string

ntpStatus

NTP status (running, not running).

string

Response example

{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": {
"failOverStatus": null,
"cvmHaNum": null,
"ntpStatus": null
}
}

2.11.7 Get Host Details​

API endpoint

GET /NSphere/api/host-resource/detail/{id}

API description

Request Content-Type

application/x-www-form-urlencoded

Response Content-Type

application/json

Request parameters

Parameter name

Description

Location

Required

Type

schema

id

Host ID

path

true

integer(int64)

Response status

Status code

Description

schema

200

OK

ApiResponseApiGetHostDetailVO

Response parameters

Parameter name

Description

Type

schema

state

Status code. 0: success, 1: failure, 2: partial success

integer(int32)

integer(int32)

errorCode

Error code. Non-zero indicates a business error occurred.

integer(int32)

integer(int32)

successMessage

Success message

string

failureMessage

Error message. Valid on failure or partial success.

string

data

Response data. If the status code is 0, normal data is returned; if non-zero and non-empty, it contains data necessary to explain the exception.

ApiGetHostDetailVO

ApiGetHostDetailVO

id

Host ID

integer(int64)

user

Username

string

hostPoolId

Data center ID

integer(int64)

clusterId

Cluster ID

integer(int64)

name

Host name

string

clusterName

Cluster name

string

type

Hypervisor type supported by the host (kvm, xen, esx).

string

ip

Host IP address

string

mask

Host subnet mask

string

model

Host model

string

vendor

Host vendor

string

cpuCount

Total CPU count

integer(int32)

cpuModel

CPU model

string

hostType

Expressed in hexadecimal. The rightmost digit indicates the CPU architecture: 0: x86, 1: ARM. The second digit indicates the operating system: 0: Ubuntu, 1: CentOS, 2: NingOS, 3: TOS.

integer(int32)

cpuFrequence

CPU frequency (unit: MHz)

integer(int32)

diskSize

Local storage size (unit: MB)

integer(int64)

vmNum

Number of VMs

integer(int32)

cpuRate

Host CPU utilization (unit: %)

number(double)

memRate

Host memory utilization (unit: %)

number(double)

status

Host status. 0: abnormal, 1: normal.

integer(int32)

runTime

Uptime

string

version

Version

string

cpuFrequenceGhz

CPU frequency (GHz)

string

memory

Memory size (unit: MB)

integer(int64)

freeMemory

Available memory

string

storage

Local storage (unit: MB)

integer(int64)

freeStorage

Local free storage

string

ipAddr

Host IP address

string

cpuSockets

Number of CPU sockets

integer(int32)

cpuCores

Number of CPU cores

integer(int32)

platForm

CVK version number

string

enableBackupNetwork

Whether a backup network exists and is delivered.

boolean

nvmeNodeName

NVMe-oF storage adapter identifier

string

pnicList

array

ApiPhysicalNICVO

name

NIC name

string

description

Description

string

status

Status. Values: 1: active, 0: inactive, -1: unknown.

integer(int32)

macAddr

MAC address

string

maintainMode

Maintenance mode status. 0: not in maintenance mode. 1: in maintenance mode. 2: entered maintenance mode due to storage fault.

integer(int32)

quarantineMode

Isolation mode status (0: not in isolation mode; 1: entered isolation mode from the UI; 2: entered isolation mode via proactive HA; 12: both proactive-HA-triggered and UI-triggered isolation modes)

integer(int32)

vswitch0AsBusinessNet

vSwitch0 acts as the business network

boolean

wakeCategory

Wake-up category (0: Wake-on-LAN, 1: IPMI wake)

integer(int32)

ipmiIpaddr

IPMI IP address

string

ipmiUser

IPMI username

string

haEnable

Whether HA is enabled. 0: not in HA. 1: in HA.

integer(int32)

serialNumber

Serial number

string

provider

Host supplier

string

occRate

Host storage utilization statistics / vms partition information (unit: %)

number(double)

topCpuRate

Peak host CPU utilization over the last hour (unit: %)

number(double)

topMemRate

Peak host memory utilization over the last hour (unit: %)

number(double)

monthAvgCpu

Average host CPU utilization over the last month (unit: %)

number(double)

monthAvgMem

Average host memory utilization over the last month (unit: %)

number(double)

monthTopCpu

Peak host CPU utilization over the last month (unit: %)

number(double)

monthTopMem

Peak host memory utilization over the last month (unit: %)

number(double)

cpuAllocRatio

CPU allocation ratio (unit: %)

number(double)

memAllocRatio

Memory allocation ratio (unit: %)

number(double)

clusterDrsGroupId

Cluster DRS group ID

integer(int64)

cpuProvider

CPU vendor

string

allocation

Allocated storage space (unit: MB)

integer(int64)

available

Available storage space (unit: MB)

integer(int64)

runningNum

Number of VMs running on the host (running and paused both count).

integer(int32)

shutoffNum

Number of powered-off VMs on the host.

integer(int32)

diskRate

Disk utilization (unit: %)

number(double)

haRole

Host high availability role / host role on the UIS UI (NORMAL: normal node, MASTER: master node, SLAVE: standby node, ARBITRATOR: arbitrator node, UNKNOWN: unknown node). Allowed values: NORMAL, MASTER, SLAVE, ARBITRATOR, UNKNOWN

string

businessRole

Host role: 0: compute type, 1: converged type, 2: storage type, -1: no compute or storage workload (management only)

integer(int32)

lowVer

Whether this is a legacy version host (E0730/E0760) (true: legacy version host, false: not a legacy version host)

boolean

hasPerm

Whether the current operator has permission on this host node

boolean

secretLevel

Host confidentiality level. Top secret (4), confidential (3), secret (2), internal (1)

integer(int32)

cvkMaintain

Whether CVK is in maintenance mode. 0: not in maintenance mode. 1: in maintenance mode.

integer(int32)

iscsiNodeName

Open-iSCSI storage adapter identifier

string

cvkVersion

CVK version

string

addTime

Time added

string(date-time)

haResource

Whether the host is an HA failover host. 0: no, 1: yes.

integer(int32)

ilos

Host iLO addresses, multiple values separated by ;.

string

storageIp

Storage IP

string

patchVersions

Patch versions

string

Response example

{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": {
"id": null,
"user": null,
"hostPoolId": null,
"clusterId": null,
"name": null,
"clusterName": null,
"type": null,
"ip": null,
"mask": null,
"model": null,
"vendor": null,
"cpuCount": null,
"cpuModel": null,
"hostType": null,
"cpuFrequence": null,
"diskSize": null,
"vmNum": null,
"cpuRate": null,
"memRate": null,
"status": null,
"runTime": null,
"version": null,
"cpuFrequenceGhz": null,
"memory": null,
"freeMemory": null,
"storage": null,
"freeStorage": null,
"ipAddr": null,
"cpuSockets": null,
"cpuCores": null,
"platForm": null,
"enableBackupNetwork": true,
"nvmeNodeName": null,
"pnicList": [
{
"name": null,
"description": null,
"status": null,
"macAddr": null
}
],
"maintainMode": null,
"quarantineMode": null,
"vswitch0AsBusinessNet": true,
"wakeCategory": null,
"ipmiIpaddr": null,
"ipmiUser": null,
"haEnable": null,
"serialNumber": null,
"provider": null,
"occRate": null,
"topCpuRate": null,
"topMemRate": null,
"monthAvgCpu": null,
"monthAvgMem": null,
"monthTopCpu": null,
"monthTopMem": null,
"cpuAllocRatio": null,
"memAllocRatio": null,
"clusterDrsGroupId": null,
"cpuProvider": null,
"allocation": null,
"available": null,
"runningNum": null,
"shutoffNum": null,
"diskRate": null,
"haRole": null,
"businessRole": null,
"lowVer": true,
"hasPerm": true,
"secretLevel": null,
"cvkMaintain": null,
"iscsiNodeName": null,
"cvkVersion": null,
"addTime": null,
"haResource": null,
"ilos": null,
"storageIp": null,
"patchVersions": null
}
}

2.11.8 Enter Host Maintenance Mode​

API endpoint

PUT /NSphere/api/host-resource/enter-maintenance

API description

Request Content-Type

application/json

Response Content-Type

application/json

Request example

{
"id": 0,
"maintainMode": null
}

Request parameters

Parameter name

Description

Location

Required

Type

schema

apiIntoMaintainDTO

ApiIntoMaintainDTO

body

true

ApiIntoMaintainDTO

ApiIntoMaintainDTO

id

Host ID

true

integer(int64)

maintainMode

Default value 0. VM handling when entering maintenance mode. 0: do nothing. 1: automatically migrate running or paused VMs on the host to other hosts. 2: automatically migrate powered-off VMs on the host to other hosts. 3: automatically migrate both running or paused VMs and powered-off VMs on the host to other hosts.

false

integer(int32)

Response status

Status code

Description

schema

200

OK

ApiResponseApiTaskMsgVO

Response parameters

Parameter name

Description

Type

schema

state

Status code. 0: success, 1: failure, 2: partial success

integer(int32)

integer(int32)

errorCode

Error code. Non-zero indicates a business error occurred.

integer(int32)

integer(int32)

successMessage

Success message

string

failureMessage

Error message. Valid on failure or partial success.

string

data

Response data. If the status code is 0, normal data is returned; if non-zero and non-empty, it contains data necessary to explain the exception.

ApiTaskMsgVO

ApiTaskMsgVO

msgId

Message ID. Can be used to query task progress.

integer(int64)

targetId

ID of the object the task is executed against

integer(int64)

targetName

Name of the object the task is executed against

string

Response example

{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": {
"msgId": 0,
"targetId": null,
"targetName": null
}
}

2.11.9 Exit Host Maintenance Mode​

API endpoint

PUT /NSphere/api/host-resource/exit-maintenance

API description

Request Content-Type

application/json

Response Content-Type

application/json

Request example

{
"id": 0
}

Request parameters

Parameter name

Description

Location

Required

Type

schema

apiExitMaintainDTO

ApiExitMaintainDTO

body

true

ApiExitMaintainDTO

ApiExitMaintainDTO

id

Host ID

true

integer(int64)

Response status

Status code

Description

schema

200

OK

ApiResponseApiTaskMsgVO

Response parameters

Parameter name

Description

Type

schema

state

Status code. 0: success, 1: failure, 2: partial success

integer(int32)

integer(int32)

errorCode

Error code. Non-zero indicates a business error occurred.

integer(int32)

integer(int32)

successMessage

Success message

string

failureMessage

Error message. Valid on failure or partial success.

string

data

Response data. If the status code is 0, normal data is returned; if non-zero and non-empty, it contains data necessary to explain the exception.

ApiTaskMsgVO

ApiTaskMsgVO

msgId

Message ID. Can be used to query task progress.

integer(int64)

targetId

ID of the object the task is executed against

integer(int64)

targetName

Name of the object the task is executed against

string

Response example

{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": {
"msgId": 0,
"targetId": null,
"targetName": null
}
}

2.11.10 Query Host HBA Information​

API endpoint

GET /NSphere/api/host-resource/hba/list

API description

Query host HBA information. Uniqueness indicator: wwn. If wwn has no value, it represents a local storage adapter on the host and the combination of hostName + name can be used. New API in the E0930 release.

Request Content-Type

application/x-www-form-urlencoded

Response Content-Type

application/json

Request parameters

Parameter name

Description

Location

Required

Type

schema

hpId

Data center ID.

query

false

integer(int64)

clusterId

Cluster ID.

query

false

integer(int64)

hostId

Host ID.

query

false

integer(int64)

Response status

Status code

Description

schema

200

OK

ApiResponseApiStorageAdapterVO

Response parameters

Parameter name

Description

Type

schema

state

Status code. 0: success, 1: failure, 2: partial success

integer(int32)

integer(int32)

errorCode

Error code. Non-zero indicates a business error occurred.

integer(int32)

integer(int32)

successMessage

Success message

string

failureMessage

Error message. Valid on failure or partial success.

string

data

Response data. If the status code is 0, normal data is returned; if non-zero and non-empty, it contains data necessary to explain the exception.

ApiStorageAdapterVO

ApiStorageAdapterVO

storageAdapters

Storage adapter entity.

array

ApiAdapterVO

name

Storage adapter name.

string

model

Storage model (NVMe-oF Software Adapter, iSCSI Software Adapter, Local SCSI).

string

type

Storage type (NVMe-oF, iSCSI, SCSI, FC).

string

status

Status (Online means online/active; anything else is inactive).

string

wwn

Adapter identifier. Globally unique except for local storage.

string

speed

Speed: Mbps. Empty string when there is no speed; "unknow" when inactive.

string

hostName

Host name.

string

software_fcoe

FCOE type. 1: software FCOE, 0: hardware FCOE.

integer(int32)

Response example

{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": {
"storageAdapters": [
{
"name": null,
"model": null,
"type": null,
"status": null,
"wwn": null,
"speed": null,
"hostName": null,
"software_fcoe": null
}
]
}
}

2.11.11 Query Host List​

API endpoint

GET /NSphere/api/host-resource/list

API description

Query host list. New response attributes added in the E0930 release.

Request Content-Type

application/x-www-form-urlencoded

Response Content-Type

application/json

Request parameters

Parameter name

Description

Location

Required

Type

schema

clusterId

Cluster ID

query

false

integer(int64)

hpId

Data center ID

query

false

integer(int64)

ids

List of host IDs. Multiple values separated by commas, e.g., 1,2,3

query

false

array

integer

notinIds

Query hosts other than the specified group IDs. Multiple values separated by commas, e.g., 1,2,3

query

false

array

integer

status

Host status. 0: abnormal, 1: normal.

query

false

integer(int32)

ipAddr

Host IP address

query

false

string

operatorGroupCode

Operator group code

query

false

string

offset

Offset. Specifies the record number from which to start returning.

query

false

integer(int32)

limit

Maximum number of records returned per page.

query

false

integer(int32)

sortDir

Sort direction. 0: no sorting, 1: ascending, 2: descending. Defaults to no sorting when sortField is set.

query

false

integer(int32)

sortField

Sort field. Supported fields: name.

query

false

string

Response status

Status code

Description

schema

200

OK

ApiResponseApiPagingListResultApiGetHostVO

Response parameters

Parameter name

Description

Type

schema

state

Status code. 0: success, 1: failure, 2: partial success

integer(int32)

integer(int32)

errorCode

Error code. Non-zero indicates a business error occurred.

integer(int32)

integer(int32)

successMessage

Success message

string

failureMessage

Error message. Valid on failure or partial success.

string

data

Response data. If the status code is 0, normal data is returned; if non-zero and non-empty, it contains data necessary to explain the exception.

ApiPagingListResultApiGetHostVO

ApiPagingListResultApiGetHostVO

data

array

ApiGetHostVO

id

Host ID

integer(int64)

user

Username

string

hostPoolId

Data center ID

integer(int64)

clusterId

Cluster ID

integer(int64)

name

Host name

string

ip

Host IP address

string

cpuCount

Total CPU count

integer(int32)

cpuModel

CPU model

string

hostType

Expressed in hexadecimal. The rightmost digit indicates the CPU architecture: 0: x86, 1: ARM. The second digit indicates the operating system: 0: Ubuntu, 1: CentOS, 2: NingOS, 3: TOS.

integer(int32)

memorySize

Memory size, in MB

integer(int64)

vmNum

Number of VMs

integer(int32)

vmRunCount

Number of running VMs on the host

integer(int32)

vmShutoff

Number of powered-off VMs on the host

integer(int32)

cpuRate

Host CPU utilization (unit: %)

number(double)

memRate

Host memory utilization (unit: %)

number(double)

status

Host status. 0: abnormal, 1: normal.

integer(int32)

runTime

Uptime

string

version

Version

string

storageCapacity

Host local storage capacity (MB)

integer(int64)

enableHA

Whether HA is enabled

integer(int32)

mcNetAddr

Management network address

string

cpuSockets

Number of CPU sockets

integer(int32)

cpuCores

Number of CPU cores

integer(int32)

platForm

CVK version number

string

enableStorNode

Whether the storage node is enabled

boolean

enableBackupNetwork

Whether a backup network exists and is delivered.

boolean

nvmeNodeName

NVMe-oF storage adapter identifier

string

maintainMode

Maintenance mode status. 0: not in maintenance mode. 1: in maintenance mode. 2: entered maintenance mode due to storage fault.

integer(int32)

quarantineMode

Isolation mode status (0: not in isolation mode; 1: entered isolation mode from the UI; 2: entered isolation mode via proactive HA; 12: both proactive-HA-triggered and UI-triggered isolation modes)

integer(int32)

vswitch0AsBusinessNet

vSwitch0 acts as the business network

boolean

wakeCategory

Wake-up category (0: Wake-on-LAN, 1: IPMI wake)

integer(int32)

ipmiIpaddr

IPMI IP address

string

ipmiUser

IPMI username

string

haEnable

Whether HA is enabled. 0: not in HA. 1: in HA.

integer(int32)

serialNumber

Serial number

string

provider

Host supplier

string

otherNum

Number of VMs in unknown state

integer(int32)

occRate

Host storage utilization statistics / vms partition information (unit: %)

number(double)

topCpuRate

Peak host CPU utilization over the last hour (unit: %)

number(double)

topMemRate

Peak host memory utilization over the last hour (unit: %)

number(double)

monthAvgCpu

Average host CPU utilization over the last month (unit: %)

number(double)

monthAvgMem

Average host memory utilization over the last month (unit: %)

number(double)

monthTopCpu

Peak host CPU utilization over the last month (unit: %)

number(double)

monthTopMem

Peak host memory utilization over the last month (unit: %)

number(double)

cpuAllocRatio

CPU allocation ratio (unit: %)

number(double)

memAllocRatio

Memory allocation ratio (unit: %)

number(double)

clusterDrsGroupId

Cluster DRS group ID

integer(int64)

frequency

CPU frequency (MHz)

integer(int32)

cpuProvider

CPU vendor

string

detail

CPU model

string

allocation

Allocated storage space (unit: MB)

integer(int64)

available

Available storage space (unit: MB)

integer(int64)

cvkMaintain

Whether CVK is in maintenance mode. 0: not in maintenance mode. 1: in maintenance mode.

integer(int32)

iscsiNodeName

Open-iSCSI storage adapter identifier

string

cvkVersion

CVK version

string

addTime

Time added

string(date-time)

haResource

Whether the host is an HA failover host. 0: no, 1: yes.

integer(int32)

ilos

Host iLO addresses, multiple values separated by ;.

string

storageIp

Storage IP

string

hypervisorType

Hypervisor type supported by the host (kvm, xen, esx). New attribute in the E0930 release.

string

diskSizeFormat

Formatted display of host local storage size. Unit is chosen automatically based on the size, e.g., 20.1GB, 10.12MB, 50.08TB. New attribute in the E0930 release.

string

storageRate

Storage utilization (unit: %). New attribute in the E0930 release.

string

offset

Offset. Specifies the record number from which to start returning.

integer(int32)

size

Number of records currently returned.

integer(int32)

total

Total data count

integer(int64)

Response example

{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": {
"data": [
{
"id": null,
"user": null,
"hostPoolId": null,
"clusterId": null,
"name": null,
"ip": null,
"cpuCount": null,
"cpuModel": null,
"hostType": null,
"memorySize": null,
"vmNum": null,
"vmRunCount": null,
"vmShutoff": null,
"cpuRate": null,
"memRate": null,
"status": null,
"runTime": null,
"version": null,
"storageCapacity": null,
"enableHA": null,
"mcNetAddr": null,
"cpuSockets": null,
"cpuCores": null,
"platForm": null,
"enableStorNode": true,
"enableBackupNetwork": true,
"nvmeNodeName": null,
"maintainMode": null,
"quarantineMode": null,
"vswitch0AsBusinessNet": true,
"wakeCategory": null,
"ipmiIpaddr": null,
"ipmiUser": null,
"haEnable": null,
"serialNumber": null,
"provider": null,
"otherNum": null,
"occRate": null,
"topCpuRate": null,
"topMemRate": null,
"monthAvgCpu": null,
"monthAvgMem": null,
"monthTopCpu": null,
"monthTopMem": null,
"cpuAllocRatio": null,
"memAllocRatio": null,
"clusterDrsGroupId": null,
"frequency": null,
"cpuProvider": null,
"detail": null,
"allocation": null,
"available": null,
"cvkMaintain": null,
"iscsiNodeName": null,
"cvkVersion": null,
"addTime": null,
"haResource": null,
"ilos": null,
"storageIp": null,
"hypervisorType": null,
"diskSizeFormat": null,
"storageRate": null
}
],
"offset": null,
"size": null,
"total": null
}
}

2.11.12 Query Host Physical NIC Information​

API endpoint

GET /NSphere/api/host-resource/nics

API description

Query host physical NIC information by hpId/clusterId/hostId. If none is provided, all hosts are queried by default. If multiple parameters are provided, hostId takes precedence for the query; if hostId is not provided, the combination of hpId and clusterId is used. New API in the E0930 release.

Request Content-Type

application/x-www-form-urlencoded

Response Content-Type

application/json

Request parameters

Parameter name

Description

Location

Required

Type

schema

clusterId

Cluster ID

query

false

integer(int64)

hpId

Data center ID

query

false

integer(int64)

hostId

Host ID

query

false

integer(int64)

Response status

Status code

Description

schema

200

OK

ApiResponseListApiHostPhysicalNICVO

Response parameters

Parameter name

Description

Type

schema

state

Status code. 0: success, 1: failure, 2: partial success

integer(int32)

integer(int32)

errorCode

Error code. Non-zero indicates a business error occurred.

integer(int32)

integer(int32)

successMessage

Success message

string

failureMessage

Error message. Valid on failure or partial success.

string

data

Response data. If the status code is 0, normal data is returned; if non-zero and non-empty, it contains data necessary to explain the exception.

array

ApiHostPhysicalNICVO

name

NIC name

string

description

Description

string

status

Status. Values: 1: active, 0: inactive, -1: unknown.

integer(int32)

macAddr

MAC address

string

speed

Speed (Mbps)

string

duplex

Duplex mode. full: full-duplex, half: half-duplex, unknown: unknown

string

carrier

Carrier status. off: off, on: on

string

mtu

Maximum transmission unit, the maximum packet size that can be transmitted at once, in bytes.

string

rxFlow

Receive traffic (unit: Mbp)

number(double)

txFlow

Transmit traffic (unit: Mbp)

number(double)

hostId

Host ID

integer(int64)

hostName

Host name

string

Response example

{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": [
{
"name": null,
"description": null,
"status": null,
"macAddr": null,
"speed": null,
"duplex": null,
"carrier": null,
"mtu": null,
"rxFlow": null,
"txFlow": null,
"hostId": null,
"hostName": null
}
]
}

2.11.13 Query Host Partitions​

API endpoint

GET /NSphere/api/host-resource/partitions

API description

Query host partition information. If host ID, cluster ID, and data center ID are all provided, the system uses host ID. New API in the E0930 release.

Request Content-Type

application/x-www-form-urlencoded

Response Content-Type

application/json

Request parameters

Parameter name

Description

Location

Required

Type

schema

hpId

Data center ID

query

false

integer(int64)

clusterId

Cluster ID

query

false

integer(int64)

hostId

Host ID

query

false

integer(int64)

Response status

Status code

Description

schema

200

OK

ApiResponseListApiHostPartitionVO

Response parameters

Parameter name

Description

Type

schema

state

Status code. 0: success, 1: failure, 2: partial success

integer(int32)

integer(int32)

errorCode

Error code. Non-zero indicates a business error occurred.

integer(int32)

integer(int32)

successMessage

Success message

string

failureMessage

Error message. Valid on failure or partial success.

string

data

Response data. If the status code is 0, normal data is returned; if non-zero and non-empty, it contains data necessary to explain the exception.

array

ApiHostPartitionVO

hostId

Host ID

integer(int64)

hostName

Host name

string

clusterId

Cluster ID

integer(int64)

hostPoolId

Data center ID

integer(int64)

partitionName

Partition name

string

utilization

Partition utilization (unit: %)

number(double)

size

Partition capacity

string

used

Used space of the partition

string

partitionType

Partition type

string

mountedDir

Partition mount directory

string

Response example

{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": [
{
"hostId": null,
"hostName": null,
"clusterId": null,
"hostPoolId": null,
"partitionName": null,
"utilization": null,
"size": null,
"used": null,
"partitionType": null,
"mountedDir": null
}
]
}

2.11.14 Query Management Platform Version​

API endpoint

GET /NSphere/api/host-resource/query-version

API description

Query the management platform version number. The returned data field is an array of three strings representing: management platform version number, version type, and internal build number. New API in the E0930 release.

Request Content-Type

application/x-www-form-urlencoded

Response Content-Type

application/json

Request parameters

Parameter name

Description

Location

Required

Type

schema

None

Response status

Status code

Description

schema

200

OK

ApiResponseListString

Response parameters

Parameter name

Description

Type

schema

state

Status code. 0: success, 1: failure, 2: partial success

integer(int32)

integer(int32)

errorCode

Error code. Non-zero indicates a business error occurred.

integer(int32)

integer(int32)

successMessage

Success message

string

failureMessage

Error message. Valid on failure or partial success.

string

data

Response data. If the status code is 0, normal data is returned; if non-zero and non-empty, it contains data necessary to explain the exception.

array

Response example

{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": []
}

2.11.15 Query CVK External Storage Information​

API endpoint

GET /NSphere/api/host-resource/shareFile/stat

API description

Query CVK external storage information. Queries only shared file systems. If host ID, cluster ID, and data center ID are all provided, the system uses host ID. New API in the E0930 release.

Request Content-Type

application/x-www-form-urlencoded

Response Content-Type

application/json

Request parameters

Parameter name

Description

Location

Required

Type

schema

hpId

Data center ID.

query

false

integer(int64)

clusterId

Cluster ID.

query

false

integer(int64)

hostId

Host ID.

query

false

integer(int64)

Response status

Status code

Description

schema

200

OK

ApiResponseListApiStorageStatVO

Response parameters

Parameter name

Description

Type

schema

state

Status code. 0: success, 1: failure, 2: partial success

integer(int32)

integer(int32)

errorCode

Error code. Non-zero indicates a business error occurred.

integer(int32)

integer(int32)

successMessage

Success message

string

failureMessage

Error message. Valid on failure or partial success.

string

data

Response data. If the status code is 0, normal data is returned; if non-zero and non-empty, it contains data necessary to explain the exception.

array

ApiStorageStatVO

name

Storage name.

string

hostName

Host name.

string

clusterId

Cluster ID.

integer(int64)

rdStat

Read rate: KBps.

number(double)

wrStat

Write rate: KBps.

number(double)

rdReq

IOPS read requests per second.

number(double)

wrReq

IOPS write requests per second.

number(double)

rdLatency

Read latency: ms.

number(double)

wrLatency

Write latency: ms.

number(double)

Response example

{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": [
{
"name": null,
"hostName": null,
"clusterId": null,
"rdStat": null,
"wrStat": null,
"rdReq": null,
"wrReq": null,
"rdLatency": null,
"wrLatency": null
}
]
}

2.11.16 Get Host Summary Information​

API endpoint

GET /NSphere/api/host-resource/summary/{id}

API description

Get host summary information. New response attributes added in the E0930 release.

Request Content-Type

application/x-www-form-urlencoded

Response Content-Type

application/json

Request parameters

Parameter name

Description

Location

Required

Type

schema

id

Host ID

path

true

integer(int64)

Response status

Status code

Description

schema

200

OK

ApiResponseApiGetHostSummaryVO

Response parameters

Parameter name

Description

Type

schema

state

Status code. 0: success, 1: failure, 2: partial success

integer(int32)

integer(int32)

errorCode

Error code. Non-zero indicates a business error occurred.

integer(int32)

integer(int32)

successMessage

Success message

string

failureMessage

Error message. Valid on failure or partial success.

string

data

Response data. If the status code is 0, normal data is returned; if non-zero and non-empty, it contains data necessary to explain the exception.

ApiGetHostSummaryVO

ApiGetHostSummaryVO

id

Host ID

integer(int64)

hostpoolId

Data center ID

integer(int64)

clusterId

Cluster ID

integer(int64)

name

Host name

string

occRate

Host storage utilization statistics / vms partition information (unit: %)

number(double)

memorySuperRatio

Memory overcommit ratio (unit: %)

number(double)

cpuSuperRatio

CPU overcommit ratio (unit: %)

number(double)

freeStorage

Local free storage

string

freeMemory

Available memory

string

memory

Memory size (unit: MB)

integer(int64)

cpuFrequenceGhz

CPU frequency (GHz)

string

cpuNum

Number of CPUs

string

model

Host model

string

vendor

Host vendor

string

cpuFrequence

CPU frequency (unit: MHz)

integer(int32)

diskSize

Local storage size (unit: MB)

integer(int64)

version

Version

string

isSafeArea

Whether it is a secure area

boolean

systemTime

System time

string

runTime

Uptime

string

vmShutoff

Number of powered-off VMs on the host

integer(int32)

vmRunCount

Number of running VMs on the host

integer(int32)

vmNum

Number of VMs

integer(int32)

ipAddr

Host IP address

string

user

Username

string

secretLevel

Host confidentiality level. Top secret (4), confidential (3), secret (2), internal (1)

integer(int32)

cpu

Total CPU count

integer(int32)

cpuCores

Number of CPU cores

integer(int32)

cpuSockets

Number of CPU sockets

integer(int32)

storage

Local storage (unit: MB)

integer(int64)

status

Host status. 0: abnormal, 1: normal.

integer(int32)

maintain

Maintenance mode status. 0: not in maintenance mode. 1: in maintenance mode. 2: entered maintenance mode due to storage fault.

integer(int32)

cvkMaintain

Whether CVK is in maintenance mode. 0: not in maintenance mode. 1: in maintenance mode.

integer(int32)

haEnable

Whether HA is enabled. 0: not in HA. 1: in HA.

integer(int32)

cpuProvider

CPU vendor

string

detail

CPU model

string

provider

Host supplier

string

operatorGroupId

Operator group ID

integer(int64)

operatorGroupCode

Operator group code

string

iscsiNodeName

Open-iSCSI storage adapter identifier

string

mac

Host MAC address

string

cvkVersion

CVK version

string

addTime

Time added

string(date-time)

storageIp

Storage IP

string

ilos

Host iLO addresses, multiple values separated by ;.

string

syncMark

Sync status. 0: not synchronized, 1: synchronized

integer(int32)

nvmeNodeName

NVMe-oF storage adapter identifier

string

businessRole

Host type. 0: compute. 1: converged. 2: storage. -1: management. New attribute in the E0930 release.

integer(int32)

mode

Host role. NORMAL: normal node. MASTER: master node. SLAVE: standby node. ARBITRATOR: arbitrator node. UNKNOWN: unknown node. New attribute in the E0930 release.

string

Response example

{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": {
"id": null,
"hostpoolId": null,
"clusterId": null,
"name": null,
"occRate": null,
"memorySuperRatio": null,
"cpuSuperRatio": null,
"freeStorage": null,
"freeMemory": null,
"memory": null,
"cpuFrequenceGhz": null,
"cpuNum": null,
"model": null,
"vendor": null,
"cpuFrequence": null,
"diskSize": null,
"version": null,
"isSafeArea": true,
"systemTime": null,
"runTime": null,
"vmShutoff": null,
"vmRunCount": null,
"vmNum": null,
"ipAddr": null,
"user": null,
"secretLevel": null,
"cpu": null,
"cpuCores": null,
"cpuSockets": null,
"storage": null,
"status": null,
"maintain": null,
"cvkMaintain": null,
"haEnable": null,
"cpuProvider": null,
"detail": null,
"provider": null,
"operatorGroupId": null,
"operatorGroupCode": null,
"iscsiNodeName": null,
"mac": null,
"cvkVersion": null,
"addTime": null,
"storageIp": null,
"ilos": null,
"syncMark": null,
"nvmeNodeName": null,
"businessRole": null,
"mode": null
}
}