Skip to main content
Compute Management/Host Related Interfaces
POSTHost Related InterfacesSince 3.1.0SynchronousAuth Required

Add KVM Host from Config File

Add KVM Host from Config File

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • paramsObjectRequired

    Request body parameter object.

    • hostInfoStringRequired

      Host information encoded in base64

    • resourceUuidString

      资源UUID。若指定,资源会使用该字段值作为UUID。

  • systemTagsList

    系统标签。

  • userTagsList

    用户标签。

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    操作是否成功。

  • errorErrorCodeRequired

    Error code. If not null, the operation failed. If null, the operation succeeded. See details error

    • codeStringRequired

      Error code number, globally unique identifier of the error, e.g. SYS.1000, HOST.1001

    • descriptionStringRequired

      Brief description of the error

    • detailsStringRequired

      Detailed error information

    • elaborationStringRequired

      Reserved field, default is null

    • opaqueLinkedHashMapRequired

      Reserved field, default is null

    • causeErrorCodeRequired

      Root cause, the error that caused the current error. If there is no original error, this field is null

  • resultsListRequired

    See details results

    • ipStringRequired

      Host IP

    • successbooleanRequired

      操作是否成功。

    • errorErrorCodeRequired

      See details error

      • codeStringRequired

        Error code number, globally unique identifier of the error, e.g. SYS.1000, HOST.1001

      • descriptionStringRequired

        Brief description of the error

      • detailsStringRequired

        Detailed error information

      • elaborationStringRequired

        Reserved field, default is null

      • opaqueLinkedHashMapRequired

        Reserved field, default is null

      • causeErrorCodeRequired

        Root cause, the error that caused the current error. If there is no original error, this field is null

Endpoint

POST/zstack/v1/hosts/kvm/from-file

/zstack/v1/hosts/kvm/from-file

Operation ID

AddKVMHostFromConfigFile

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/hosts/kvm/from-file' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"hostInfo":"<hostInfo>","resourceUuid":"<resourceUuid>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "results": [ { "ip": "127.0.0.1", "success": true } ] }

Change History

This API has no change history records yet.

View all change history