Resource Center/Hardware/Host Operations
POSTHost OperationsSince 0.6SynchronousAuth Required
AddKVMHost
AddKVMHost
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Request Inputs
Body Fields
paramsObjectRequiredRequest body parameter object.
usernameStringRequiredThe SSH username.
passwordStringRequiredThe SSH password.
sshPortintOptional. The SSH port No.
nameStringRequiredThe resource name.
descriptionStringOptional. The detailed description of the resource.
managementIpStringRequiredThe IP address of the host management node.
clusterUuidStringRequiredThe cluster UUID.
resourceUuidStringOptional. The resource UUID.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/hosts/kvm
/zstack/v1/hosts/kvm
Request Example
curl -X POST 'http://{host}/zstack/v1/hosts/kvm' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"username":"<username>","password":"<password>","sshPort":1,"name":"<name>","description":"<description>","managementIp":"<managementIp>","clusterUuid":"<clusterUuid>","resourceUuid":"<resourceUuid>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "zoneUuid": "d4160c59319c4642832e666514364a79", "name": "example", "uuid": "479e88bab7a647e3b066a724c8bb3b82", "clusterUuid": "42ade59801804602b9986b42fd103d1c", "description": "example", "managementIp": "192.168.0.1", "hypervisorType": "KVM", "state": "Enabled", "status": "Connected", "totalCpuCapacity": 4.0, "availableCpuCapacity": 2.0, "totalMemoryCapacity": 4.0, "availableMemoryCapacity": 4.0 } }Change History
This API has no change history records yet.
