Cluster
2.4.1 Cluster Details
API endpoint
GET /NSphere/api/cluster-resource
API description
At least one of id and clusterName must be provided. If both are provided, id takes precedence. 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 | Cluster ID (at least one of cluster ID and cluster name must be provided. If both are provided, the system uses cluster ID.) | query | false | integer(int64) | |
clusterName | Cluster name (at least one of cluster ID and cluster name must be provided. If both are provided, the system uses cluster ID.) | query | false | string |
Response status
Status code | Description | schema |
200 | OK | ApiResponseApiGetClusterDetailVO |
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. | ApiGetClusterDetailVO | ApiGetClusterDetailVO |
id | Cluster ID. | integer(int64) | |
hostPoolId | Data center ID. | integer(int64) | |
hostPoolName | Data center name. New attribute in the E0930 release. | string | |
name | Cluster name. | string | |
description | Cluster description. | string | |
enableHA | Whether HA (High Availability) is enabled. 0: not enabled, 1: enabled. | integer(int32) | |
priority | Startup priority (High Availability). 0: low, 1: medium, 2: high. | integer(int32) | |
sensitivity | Host sub-health sensitivity level. 0: low, 1: medium, 2: high, 3: custom. | integer(int32) | |
enableLB | Whether compute resource DRS (Dynamic Resource Scheduling) is enabled. 0: disabled, 1: enabled. | integer(int32) | |
enableIntelligent | Whether intelligent DRS is enabled. Values: 0: disabled, 1: enabled. | integer(int32) | |
persistTime | (Compute resource DRS) duration, in minutes. | integer(int32) | |
checkInterval | (Compute resource DRS) check interval, in minutes. | integer(int32) | |
enableIPM | Whether intelligent power management is enabled. 0: disabled, 1: enabled. | integer(int32) | |
persistTimeIPM | (Intelligent power management) duration, in minutes. | integer(int32) | |
ipmLowerMonitorId | (Intelligent power management) host reclamation monitoring policy ID. | integer(int64) | |
ipmLowerMonitorName | (Intelligent power management) host reclamation monitoring policy name. | string | |
ipmUpperMonitorId | (Intelligent power management) host wake-up policy ID. | integer(int64) | |
ipmUpperMonitorName | (Intelligent power management) host wake-up policy name. | string | |
checkIntervalIPM | (Intelligent power management) check interval, in minutes. | integer(int32) | |
drsEnableTime | Time period during which cluster DRS is enabled. The high 2 bytes represent the start time; the low 2 bytes represent the end time. In each 2-byte time value, the high byte represents hours and the low byte represents minutes. (Example: start time 01:10, end time 16:40, field value 0x010a1028) | integer(int32) | |
enableDrsEnableTime | Whether the DRS effective time period is enabled (0: disabled, 1: enabled) | integer(int32) | |
ipmEnableTime | Time period during which cluster IPM is enabled. The high 2 bytes represent the start time; the low 2 bytes represent the end time. In each 2-byte time value, the high byte represents hours and the low byte represents minutes. (Example: start time 01:10, end time 16:40, field value 0x010a1028) | integer(int32) | |
enableIPMEnableTime | Whether the power management effective time period is enabled (0: disabled, 1: enabled) | integer(int32) | |
operatorGroupCode | Operator group code. | string | |
broadcastAddr | Multicast address. | string | |
broadcastPort | Multicast port. | integer(int32) | |
lbMonitorId | Compute resource DRS monitoring policy ID. | integer(int64) | |
lbMonitorName | Compute resource DRS monitoring policy name. | string | |
haMinHost | Minimum number of nodes required for HA admission control. If the number of hosts running normally in the cluster is less than this parameter, VMs cannot undergo HA failover. (Only valid when haControlStrategy is 1. haMinHost = -1 means the minimum node count strategy is not used.) | integer(int32) | |
enableSLB | Whether storage resource DRS is enabled. 0: disabled, 1: enabled. | integer(int32) | |
slbPersistTime | Storage resource DRS duration, in minutes. | integer(int32) | |
slbCheckInterval | Storage resource DRS check interval, in minutes. | integer(int32) | |
slbMonitorId | Storage resource DRS monitoring policy ID | integer(int64) | |
slbMonitorName | Storage resource DRS monitoring policy name | string | |
enableStorageHA | Whether local storage HA is enabled. 0: not enabled, 1: enabled | integer(int32) | |
haControlStrategy | HA admission control strategy. 0: disable HA admission control; 1: use minimum-node strategy — if the number of hosts running normally in the cluster is less than this parameter, VMs cannot undergo HA failover; 2: use HA resource reservation strategy — reserve a percentage of resources (CPU or memory) for HA to keep it stable. When the remaining cluster resources fall below the configured ratio, VMs in the cluster cannot be started, restored to running/paused state, or migrated in while running; 3: use failover host strategy — when a faulty VM in the HA cluster needs automatic migration, the destination host is preferentially chosen from the specified host group; that host group is used only for failover migration and cannot be used as a destination for adding or migrating VMs. | integer(int32) | |
haCpuRetain | HA CPU resource reservation (unit: %). Valid only when haControlStrategy is 2. | integer(int32) | |
haMemRetain | HA memory resource reservation (unit: %). Valid only when haControlStrategy is 2. | integer(int32) | |
enableBusinessHA | Whether business network HA is enabled. 0: disabled, 1: enabled. | integer(int32) | |
proactiveHA | Proactive HA. 0: disabled, 1: enabled. | integer(int32) | |
containerCluster | Whether this is a container cluster. 0: normal cluster, 1: container cluster. | integer(int32) | |
localDiskHa | Enable/disable local disk HA. 1: enabled, 0: disabled. | integer(int32) | |
localDiskTime | Local disk fault detection interval, in seconds. | integer(int32) | |
strategyDelayTime | Strategy timeout (host storage fault handling strategy delay time, in minutes). Default: 12000. | integer(int32) | |
cpuMode | VM CPU operating mode: 0 — compatibility mode; 1 — host-match mode; 2 — passthrough mode; 3 — EMC mode. | integer(int32) | |
emcType | EMC mode (0: Intel EMC, 1: AMD EMC). Valid only when cpuMode is 3. | integer(int32) | |
emcCpuModel | Specific CPU model (allowed values: 10 Conroe, 20 Penryn, 30 Nehalem, 40 Westmere, 50 SandyBridge, 60 IvyBridge, 70 Haswell, 80 Broadwell, 90 Skylake-Client, 100 Skylake-Server, 110 Cascadelake-Server, 120 Icelake-Client, 130 Icelake-Server, 10010 Opteron_G1, 10020 Opteron_G2, 10030 phenom, 10040 Opteron_G3, 10050 Opteron_G4, 10060 Opteron_G5, 10070 EPYC). Valid only when cpuMode is 3. | integer(int32) | |
type | Identifies the CPU architecture and kernel of hosts in the cluster. 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) | |
enableStretched | Cluster stretched configuration switch. 0: stretched configuration disabled; 1: stretched configuration enabled. | integer(int32) | |
proactiveHAParams | Proactive HA rules. | array | ProactiveHAParamVO |
id | Proactive HA rule ID | integer(int64) | |
clusterId | ID of the cluster to which the proactive HA rule belongs | integer(int64) | |
type | Type (cpuTemperature: CPU temperature too high; diskFault: system disk fault; ramError: memory CE error frequency; ramIsolation: memory CE error page isolation ratio; diskLifeOver: host system disk nearing end of life (SSD); powerModuleFault: only one power module remaining on the host; raidFault: RAID controller fault) | string | |
threshold | Threshold. When the threshold is exceeded and the persistTime duration is reached, proactive HA is triggered. (Only the following items support this setting: CPU temperature too high, memory CE error frequency, memory CE error page isolation ratio, disk wear level when the host system disk is nearing end of life (SSD). Other proactive HA options have a fixed value of 0.) | integer(int32) | |
persistTime | Duration. When the threshold is exceeded and this duration is reached, proactive HA is triggered. (Only CPU temperature too high supports this setting; other proactive HA options have a fixed value of 1.) | integer(int32) | |
responseMode | Response mode (proactive HA supports only these: 2: intelligent live migration, 3: host isolation, 4: host enters maintenance mode) | integer(int32) | |
enable | Whether this proactive HA rule is enabled (0: disabled, 1: enabled) | integer(int32) | |
faultHAParams | Fault HA rules. | array | FaultHAParamVO |
type | Fault HA type (hostFault: host fault, vmFault: VM fault, businessNetFault: business network fault, hostStorageFault: host storage fault) | string | |
enable | Whether the fault HA rule is enabled (0: disabled, 1: enabled) | integer(int32) | |
threshold | Threshold (only host storage fault supports this setting; the value is the timeout, in minutes) | integer(int32) | |
triggerAction | Response mode (1: failover migration, 2: no action, 3: I/O transfer, 4: online migration) | integer(int32) |
Response example
{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": {
"id": null,
"hostPoolId": null,
"hostPoolName": null,
"name": null,
"description": null,
"enableHA": null,
"priority": null,
"sensitivity": null,
"enableLB": null,
"enableIntelligent": null,
"persistTime": null,
"checkInterval": null,
"enableIPM": null,
"persistTimeIPM": null,
"ipmLowerMonitorId": null,
"ipmLowerMonitorName": null,
"ipmUpperMonitorId": null,
"ipmUpperMonitorName": null,
"checkIntervalIPM": null,
"drsEnableTime": null,
"enableDrsEnableTime": null,
"ipmEnableTime": null,
"enableIPMEnableTime": null,
"operatorGroupCode": null,
"broadcastAddr": null,
"broadcastPort": null,
"lbMonitorId": null,
"lbMonitorName": null,
"haMinHost": null,
"enableSLB": null,
"slbPersistTime": null,
"slbCheckInterval": null,
"slbMonitorId": null,
"slbMonitorName": null,
"enableStorageHA": null,
"haControlStrategy": null,
"haCpuRetain": null,
"haMemRetain": null,
"enableBusinessHA": null,
"proactiveHA": null,
"containerCluster": null,
"localDiskHa": null,
"localDiskTime": null,
"strategyDelayTime": null,
"cpuMode": null,
"emcType": null,
"emcCpuModel": null,
"type": null,
"enableStretched": null,
"proactiveHAParams": [
{
"id": null,
"clusterId": null,
"type": null,
"threshold": null,
"persistTime": null,
"responseMode": null,
"enable": null
}
],
"faultHAParams": [
{
"type": null,
"enable": null,
"threshold": null,
"triggerAction": null
}
]
}
}
2.4.2 Add Cluster
API endpoint
POST /NSphere/api/cluster-resource
API description
Request Content-Type
application/json
Response Content-Type
application/json
Request example
{
"name": "",
"description": null,
"enableHA": 0,
"priority": 1,
"sensitivity": 1,
"hostPoolId": 0,
"haControlStrategy": 0,
"haCpuRetain": null,
"haMemRetain": null,
"cpuMode": 0,
"emcType": null,
"emcCpuModel": null,
"haMinHost": null
}
Request parameters
Parameter name | Description | Location | Required | Type | schema |
apiAddClusterDTO | ApiAddClusterDTO | body | true | ApiAddClusterDTO | ApiAddClusterDTO |
name | Cluster name. Minimum length 1, maximum length 32. Allowed characters: Chinese characters, letters, digits, hyphens, underscores, spaces, and dots. Cannot be all spaces. | true | string | ||
description | Cluster description. | false | string | ||
enableHA | Whether HA (High Availability) is enabled. 0: not enabled, 1: enabled. | true | integer(int32) | ||
priority | Startup priority (High Availability). 0: low, 1: medium, 2: high. | false | integer(int32) | ||
sensitivity | HA sensitivity. Only effective when HA is enabled. Values: 0: low, 1: medium, 2: high. Default value 1. Low sensitivity disables business network fault HA, disables all proactive HA, does not report sub-health issues, and implements a minimally intrusive monitoring mode. Medium sensitivity disables business network fault HA, enables all proactive HA, reports sub-health issues, and triggers host isolation for balanced protection of business continuity. High sensitivity disables business network fault HA, enables all proactive HA, reports host sub-health issues, and triggers intelligent live migration to ensure high availability and minimize business interruption. | false | integer(int32) | ||
hostPoolId | Data center ID. | true | integer(int64) | ||
haControlStrategy | HA admission control strategy. 0: disable HA admission control; 1: use minimum-node strategy — if the number of hosts running normally in the cluster is less than this parameter, VMs cannot undergo HA failover; 2: use HA resource reservation strategy — reserve a percentage of resources (CPU or memory) for HA to keep it stable. When the remaining cluster resources fall below the configured ratio, VMs in the cluster cannot be started, restored to running/paused state, or migrated in while running; 3: use failover host strategy — when a faulty VM in the HA cluster needs automatic migration, the destination host is preferentially chosen from the specified host group; that host group is used only for failover migration and cannot be used as a destination for adding or migrating VMs. | true | integer(int32) | ||
haCpuRetain | HA CPU resource reservation (unit: %). Valid only when haControlStrategy is 2. | false | integer(int32) | ||
haMemRetain | HA memory resource reservation (unit: %). Valid only when haControlStrategy is 2. | false | integer(int32) | ||
cpuMode | VM CPU operating mode: 0 — compatibility mode; 1 — host-match mode; 2 — passthrough mode; 3 — EMC mode. | false | integer(int32) | ||
emcType | EMC mode (0: Intel EMC, 1: AMD EMC). Valid only when cpuMode is 3. | false | integer(int32) | ||
emcCpuModel | Specific CPU model (allowed values: 10 Conroe, 20 Penryn, 30 Nehalem, 40 Westmere, 50 SandyBridge, 60 IvyBridge, 70 Haswell, 80 Broadwell, 90 Skylake-Client, 100 Skylake-Server, 110 Cascadelake-Server, 120 Icelake-Client, 130 Icelake-Server, 10010 Opteron_G1, 10020 Opteron_G2, 10030 phenom, 10040 Opteron_G3, 10050 Opteron_G4, 10060 Opteron_G5, 10070 EPYC). Valid only when cpuMode is 3. | false | integer(int32) | ||
haMinHost | Minimum number of nodes required for HA admission control. If the number of hosts running normally in the cluster is less than this parameter, VMs cannot undergo HA failover. (Only valid when haControlStrategy is 1. haMinHost = -1 means the minimum node count strategy is not used.) | false | integer(int32) |
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.4.3 Modify Cluster Name
API endpoint
PUT /NSphere/api/cluster-resource/{id}
API description
Modify the cluster name. Hyperconverged clusters do not support renaming.
Request Content-Type
application/json
Response Content-Type
application/json
Request example
{
"name": ""
}
Request parameters
Parameter name | Description | Location | Required | Type | schema |
id | Cluster ID. | path | true | integer(int64) | |
apiModifyClusterDTO | ApiModifyClusterDTO | body | true | ApiModifyClusterDTO | ApiModifyClusterDTO |
name | Cluster name. Minimum length 1, maximum length 32. Allowed characters: Chinese characters, letters, digits, hyphens, underscores, spaces, and dots. Cannot be all spaces. | 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.4.4 Delete Cluster
API endpoint
DELETE /NSphere/api/cluster-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 | Cluster 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.4.5 Cluster List
API endpoint
GET /NSphere/api/cluster-resource/list
API description
Cluster list. New parameters 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 |
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) | |
sortField | Sort field. Supported fields: name. | query | false | string | |
sortDir | Sort direction. 0: no sorting, 1: ascending, 2: descending. Defaults to no sorting when sortField is set. | query | false | integer(int32) | |
ids | List of cluster IDs. Example: ids=1&ids=2&ids=3 | query | false | array | integer |
clusterName | Cluster name. New parameter in the E0930 release. | query | false | string | |
hpId | Data center ID | query | false | integer(int64) |
Response status
Status code | Description | schema |
200 | OK | ApiResponseApiPagingListResultApiGetClusterVO |
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. | ApiPagingListResultApiGetClusterVO | ApiPagingListResultApiGetClusterVO |
data | Cluster information. | array | ApiGetClusterVO |
id | Cluster ID. | integer(int64) | |
name | Cluster name. | string | |
description | Cluster description. | string | |
hostPoolId | Data center ID. | integer(int64) | |
enableHA | Whether HA (High Availability) is enabled. 0: not enabled, 1: enabled. | integer(int32) | |
priority | Startup priority (High Availability). 0: low, 1: medium, 2: high. | integer(int32) | |
sensitivity | Host sub-health sensitivity level. 0: low, 1: medium, 2: high, 3: custom. | integer(int32) | |
enableLB | Whether compute resource DRS (Dynamic Resource Scheduling) is enabled. 0: disabled, 1: enabled. | integer(int32) | |
enableIntelligent | Whether intelligent DRS is enabled. Values: 0: disabled, 1: enabled. | integer(int32) | |
persistTime | (Compute resource DRS) duration, in minutes. | integer(int32) | |
checkInterval | (Compute resource DRS) check interval, in minutes. | integer(int32) | |
enableIPM | Whether intelligent power management is enabled. 0: disabled, 1: enabled. | integer(int32) | |
enableIPMEnableTime | Whether the power management effective time period is enabled (0: disabled, 1: enabled) | integer(int32) | |
persistTimeIPM | (Intelligent power management) duration, in minutes. | integer(int32) | |
ipmLowerMonitorId | (Intelligent power management) host reclamation monitoring policy ID. | integer(int64) | |
ipmUpperMonitorId | (Intelligent power management) host wake-up policy ID. | integer(int64) | |
checkIntervalIPM | (Intelligent power management) check interval, in minutes. | integer(int32) | |
drsEnableTime | Time period during which cluster DRS is enabled. The high 2 bytes represent the start time; the low 2 bytes represent the end time. In each 2-byte time value, the high byte represents hours and the low byte represents minutes. (Example: start time 01:10, end time 16:40, field value 0x010a1028) | integer(int32) | |
enableDrsEnableTime | Whether the DRS effective time period is enabled (0: disabled, 1: enabled) | integer(int32) | |
ipmEnableTime | Time period during which cluster IPM is enabled. The high 2 bytes represent the start time; the low 2 bytes represent the end time. In each 2-byte time value, the high byte represents hours and the low byte represents minutes. (Example: start time 01:10, end time 16:40, field value 0x010a1028) | integer(int32) | |
operatorGroupId | Operator group ID. | integer(int64) | |
operatorGroupCode | Operator group code. | string | |
lbMonitorId | Compute resource DRS monitoring policy ID. | integer(int64) | |
haMinHost | Minimum number of nodes required for HA admission control. If the number of hosts running normally in the cluster is less than this parameter, VMs cannot undergo HA failover. (Only valid when haControlStrategy is 1. haMinHost = -1 means the minimum node count strategy is not used.) | integer(int32) | |
enableSLB | Whether storage resource DRS is enabled. 0: disabled, 1: enabled. | integer(int32) | |
slbPersistTime | Storage resource DRS duration, in minutes. | integer(int32) | |
slbCheckInterval | Storage resource DRS check interval, in minutes. | integer(int32) | |
slbMonitorId | Storage resource DRS monitoring policy ID | integer(int64) | |
enableStorageHA | Whether local storage HA is enabled. 0: not enabled, 1: enabled | integer(int32) | |
haControlStrategy | HA admission control strategy. 0: disable HA admission control; 1: use minimum-node strategy — if the number of hosts running normally in the cluster is less than this parameter, VMs cannot undergo HA failover; 2: use HA resource reservation strategy — reserve a percentage of resources (CPU or memory) for HA to keep it stable. When the remaining cluster resources fall below the configured ratio, VMs in the cluster cannot be started, restored to running/paused state, or migrated in while running; 3: use failover host strategy — when a faulty VM in the HA cluster needs automatic migration, the destination host is preferentially chosen from the specified host group; that host group is used only for failover migration and cannot be used as a destination for adding or migrating VMs. | integer(int32) | |
haCpuRetain | HA CPU resource reservation (unit: %). Valid only when haControlStrategy is 2. | integer(int32) | |
haMemRetain | HA memory resource reservation (unit: %). Valid only when haControlStrategy is 2. | integer(int32) | |
enableBusinessHA | Whether business network HA is enabled. 0: disabled, 1: enabled. | integer(int32) | |
triggerAction | Host storage fault handling strategy (trigger action). 1: failover migration, 2: no action, 3: I/O transfer. | integer(int32) | |
containerCluster | Whether this is a container cluster. 0: normal cluster, 1: container cluster. | integer(int32) | |
localDiskHa | Enable/disable local disk HA. 1: enabled, 0: disabled. | integer(int32) | |
localDiskTime | Local disk fault detection interval, in seconds. | integer(int32) | |
strategyDelayTime | Strategy timeout (host storage fault handling strategy delay time, in minutes). Default: 12000. | integer(int32) | |
cpuMode | VM CPU operating mode: 0 — compatibility mode; 1 — host-match mode; 2 — passthrough mode; 3 — EMC mode. | integer(int32) | |
emcType | EMC mode (0: Intel EMC, 1: AMD EMC). Valid only when cpuMode is 3. | integer(int32) | |
emcCpuModel | Specific CPU model (allowed values: 10 Conroe, 20 Penryn, 30 Nehalem, 40 Westmere, 50 SandyBridge, 60 IvyBridge, 70 Haswell, 80 Broadwell, 90 Skylake-Client, 100 Skylake-Server, 110 Cascadelake-Server, 120 Icelake-Client, 130 Icelake-Server, 10010 Opteron_G1, 10020 Opteron_G2, 10030 phenom, 10040 Opteron_G3, 10050 Opteron_G4, 10060 Opteron_G5, 10070 EPYC). Valid only when cpuMode is 3. | integer(int32) | |
type | Identifies the CPU architecture and kernel of hosts in the cluster. 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) | |
enableStretched | Cluster stretched configuration switch. 0: stretched configuration disabled; 1: stretched configuration enabled. | integer(int32) | |
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,
"name": null,
"description": null,
"hostPoolId": null,
"enableHA": null,
"priority": null,
"sensitivity": null,
"enableLB": null,
"enableIntelligent": null,
"persistTime": null,
"checkInterval": null,
"enableIPM": null,
"enableIPMEnableTime": null,
"persistTimeIPM": null,
"ipmLowerMonitorId": null,
"ipmUpperMonitorId": null,
"checkIntervalIPM": null,
"drsEnableTime": null,
"enableDrsEnableTime": null,
"ipmEnableTime": null,
"operatorGroupId": null,
"operatorGroupCode": null,
"lbMonitorId": null,
"haMinHost": null,
"enableSLB": null,
"slbPersistTime": null,
"slbCheckInterval": null,
"slbMonitorId": null,
"enableStorageHA": null,
"haControlStrategy": null,
"haCpuRetain": null,
"haMemRetain": null,
"enableBusinessHA": null,
"triggerAction": null,
"containerCluster": null,
"localDiskHa": null,
"localDiskTime": null,
"strategyDelayTime": null,
"cpuMode": null,
"emcType": null,
"emcCpuModel": null,
"type": null,
"enableStretched": null
}
],
"offset": null,
"size": null,
"total": null
}
}
2.4.6 Query Cluster External Storage Consistency
API endpoint
GET /NSphere/api/cluster-resource/shareFile/same
API description
Query cluster external storage consistency. 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 |
id | Cluster ID (if both cluster ID and data center ID are provided, the system uses cluster ID) | query | false | integer(int64) | |
hpId | Data center ID (if both cluster ID and data center ID are provided, the system uses cluster ID) | query | false | integer(int64) |
Response status
Status code | Description | schema |
200 | OK | ApiResponseListApiShareFileSameVO |
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 | ApiShareFileSameVO |
clusterId | Cluster ID. | integer(int64) | |
clusterName | Cluster name. | string | |
consistency | External storage consistency (true: consistent, false: inconsistent). | string |
Response example
{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": [
{
"clusterId": null,
"clusterName": null,
"consistency": null
}
]
}
2.4.7 Cluster External Storage
API endpoint
GET /NSphere/api/cluster-resource/shareFile/stat
API description
Cluster external storage. 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) |
Response status
Status code | Description | schema |
200 | OK | ApiResponseListApiShareFileStatVO |
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 | ApiShareFileStatVO |
name | Storage name. | string | |
clusterId | Cluster ID. | integer(int64) | |
usage | Storage utilization, as a percentage. | number(double) | |
rdStat | Read throughput: KBps. | number(double) | |
wrStat | Write throughput: KBps. | number(double) | |
rdReq | Read requests per second. | number(double) | |
wrReq | Write requests per second. | number(double) |
Response example
{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": [
{
"name": null,
"clusterId": null,
"usage": null,
"rdStat": null,
"wrStat": null,
"rdReq": null,
"wrReq": null
}
]
}
2.4.8 Query VM Groups or Host Groups
API endpoint
GET /NSphere/api/cluster-resource/vmHostGroup
API description
Query VM groups or host groups. 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 |
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 empty. | query | false | integer(int32) | |
sortField | Sort field. Supported fields: flag, name, id. | query | false | string | |
flag | Group type (1: VM group, 2: host group, 3: stretched configuration VM group, 4: stretched configuration host group). | query | false | integer(int64) | |
ne_id | VM/host group ID to exclude from the query (groups whose ID is not equal to this value) | query | false | integer(int64) | |
clusterId | Cluster ID. | query | false | integer(int64) | |
groupName | Name of the VM/host group. | query | false | string |
Response status
Status code | Description | schema |
200 | OK | ApiResponseApiPagingListResultApiVMHostGroupVO |
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. | ApiPagingListResultApiVMHostGroupVO | ApiPagingListResultApiVMHostGroupVO |
data | VM/host group information. | array | ApiVMHostGroupVO |
flag | Group type (1: VM group, 2: host group, 3: stretched configuration VM group, 4: stretched configuration host group). | integer(int32) | |
name | Name of the VM/host group. | string | |
clusterId | Cluster ID | integer(int64) | |
id | VM/host group ID. | integer(int64) | |
drsGroupVmHosts | Information about the VMs/hosts in the VM/host group. | array | ApiVMHostGroupHostVO |
nspheretoolsVersion | nspheretools version | string | |
haStatus | HA exception status (0: normal, 1: not joined to HA, 2: joined to HA, configuration file not synchronized) | integer(int32) | |
nspheretoolsStatus | nspheretools status (0: not running, 1: running) | integer(int32) | |
hostIp | Host IP | string | |
hostId | ID of the host on which the VM resides | integer(int64) | |
cpu | Number of VM CPUs | integer(int32) | |
clusterId | ID of the cluster in which the VM resides | integer(int64) | |
title | VM display name (used for display, editable) | string | |
enableUltra | Whether the VM has Ultra mode enabled (1: enabled; 0 or empty: not enabled). | integer(int32) | |
uuid | VM UUID | string | |
hostPoolId | ID of the data center in which the VM resides | integer(int64) | |
uptime | VM uptime (in minutes; -1 means unknown) | integer(int32) | |
system | VM operating system version information | string | |
mem | VM memory (unit: MB) | integer(int64) | |
antivirusConfig | Whether antivirus configuration is enabled for the VM (0: not enabled, 1: enabled) | integer(int32) | |
enable | VM state (1: VM, 2: template, 3: deleted VM, 4: being created) | integer(int32) | |
protectModel | Whether the VM has protection mode enabled (1: enabled, 0: not enabled) | integer(int32) | |
name | VM name | string | |
host | Name of the host on which the VM resides | string | |
haManage | HA state (0: not managed by HA, 1: managed by HA) | integer(int32) | |
sysInt | VM installed operating system (0: Windows, 1: Linux, 2: BSD) | integer(int32) | |
id | VM ID | integer(int64) | |
desc | VM description | string | |
status | VM state (string): ha_exception (when the VM's haStatus is not 0 but has another value), unknown, running, shutoff, paused, sleeping. Host state (numeric string): in maintenance mode (3: maintenance mode, 4: local storage fault maintenance mode); not in maintenance mode (2: host not abnormal and in HA cluster but HA not enabled on host); other (0: abnormal, 1: normal, 5: isolation mode, and so on). | 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": [
{
"flag": null,
"name": null,
"clusterId": null,
"id": null,
"drsGroupVmHosts": [
{
"nspheretoolsVersion": null,
"haStatus": null,
"nspheretoolsStatus": null,
"hostIp": null,
"hostId": null,
"cpu": null,
"clusterId": null,
"title": null,
"enableUltra": null,
"uuid": null,
"hostPoolId": null,
"uptime": null,
"system": null,
"mem": null,
"antivirusConfig": null,
"enable": null,
"protectModel": null,
"name": null,
"host": null,
"haManage": null,
"sysInt": null,
"id": null,
"desc": null,
"status": null
}
]
}
],
"offset": null,
"size": null,
"total": null
}
}
2.4.9 Add VM Group or Host Group
API endpoint
POST /NSphere/api/cluster-resource/vmHostGroup
API description
Add a VM group or host group. New API in the E0930 release.
Request Content-Type
application/json
Response Content-Type
application/json
Request example
{
"clusterId": 0,
"flag": 0,
"name": "",
"drsGroupDetailList": [
{
"entityId": 0,
"entityName": null
}
]
}
Request parameters
Parameter name | Description | Location | Required | Type | schema |
apiAddVMHostGroupDTO | Request entity for adding a VM group or host group | body | true | ApiAddVMHostGroupDTO | ApiAddVMHostGroupDTO |
clusterId | Cluster ID. | true | integer(int64) | ||
flag | Group type (1: VM group, 2: host group). | true | integer(int32) | ||
name | Group name. Allowed characters: Chinese characters, letters, digits, hyphens, underscores, spaces, and dots. Cannot be all spaces. Maximum length 64 characters. | true | string | ||
drsGroupDetailList | VM list or host list entity | true | array | VMHostGroupDetailDTO | |
entityId | VM ID or host ID | true | integer(int64) | ||
entityName | VM name or host name | false | string |
Response status
Status code | Description | schema |
200 | OK | VmHostGroupApiResponseLong |
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 | VM group ID or host group ID | integer(int64) | integer(int64) |
Response example
{
"state": 0,
"errorCode": 0,
"successMessage": null,
"failureMessage": null,
"data": null
}