创建主机资源

接口URL

/api/v1/resource/host

请求方式

POST

Content-Type

application/json

认证方式

Bearer auth

请求Header参数

参数名 示例值 参数类型 是否必填 参数描述
Accept application/json Text -
Content-Type application/json Text -

请求Body参数

[
    {
        "IP": "172.17.0.16",
        "UserName": "root",
        "Password": "tem",
        "SSHPort": 22,
        "CpuArch": "aarch64",
        "CpuModel": "Kunpeng-920",
        "CpuCores": 64,
        "OS": "CentOS Linux 8",
        "Memory": 190,
        "Storage": 7375,
        "DiskType": "SSD",
        "State": "",
        "Tag": "",
        "Location": "",
        "Stat": "",
        "Status": ""
    },
        {
        "IP": "172.17.0.17",
        "UserName": "root",
        "Password": "tem",
        "SSHPort": 22,
        "CpuArch": "aarch64",
        "CpuModel": "Kunpeng-920",
        "CpuCores": 64,
        "OS": "CentOS Linux 8",
        "Memory": 190,
        "Storage": 7375,
        "DiskType": "SSD",
        "State": "",
        "Tag": "",
        "Location": "",
        "Stat": "",
        "Status": ""
    }
]
参数名 示例值 参数类型 是否必填 参数描述
IP 172.17.0.15 String IP 地址
UserName root String 用户名
Password password String 密码
SSHPort 22 Integer SSH 端口号
CpuArch aarch64 String CPU 架构 [x86/aarch64]
CpuModel Kunpeng-920 String CPU 型号
CpuCores 64 Integer CPU 核心数量
OS CentOS Linux 8 String 操作系统
Memory 190 Integer 内存容量,单位 GB
Storage 7375 Integer 存储空间,单位 GB
DiskType SSD String 磁盘类型 [HDD/SSD]
Tag tag1 String 主机标签
Location beijing1 String 主机位置

成功响应示例

{
    "Data": [{
        "ID": 13,
        "CreatedAt": "2023-09-21T12:02:29.377+08:00",
        "UpdatedAt": "2023-09-21T12:02:29.377+08:00",
        "DeletedAt": null,
        "IP": "172.17.0.16",
        "UserName": "root",
        "Password": "******",
        "HostName": "",
        "SSHPort": 22,
        "Status": "Init",
        "OS": "CentOS Linux 8",
        "CpuArch": "aarch64",
        "CpuModel": "Kunpeng-920",
        "CpuCores": 64,
        "Memory": 190,
        "Storage": 7375,
        "DiskType": "SSD",
        "Stat": "LoadLess",
        "FreeStorage": 7375,
        "FreeCpuCores": 64,
        "FreeMemory": 190,
        "ClusterID": "",
        "NodeExporterPort": 9200,
        "Location": "",
        "Tag": "",
        "HostType": "PM",
        "ErrorMsg": "",
        "Comment": ""
    }, {
        "ID": 14,
        "CreatedAt": "2023-09-21T12:02:29.377+08:00",
        "UpdatedAt": "2023-09-21T12:02:29.377+08:00",
        "DeletedAt": null,
        "IP": "172.17.0.17",
        "UserName": "root",
        "Password": "******",
        "HostName": "",
        "SSHPort": 22,
        "Status": "Init",
        "OS": "CentOS Linux 8",
        "CpuArch": "aarch64",
        "CpuModel": "Kunpeng-920",
        "CpuCores": 64,
        "Memory": 190,
        "Storage": 7375,
        "DiskType": "SSD",
        "Stat": "LoadLess",
        "FreeStorage": 7375,
        "FreeCpuCores": 64,
        "FreeMemory": 190,
        "ClusterID": "",
        "NodeExporterPort": 9200,
        "Location": "",
        "Tag": "",
        "HostType": "PM",
        "ErrorMsg": "",
        "Comment": ""
    }],
    "Success": true
}
参数名 示例值 参数类型 参数描述
Data - Array
Data.ID 13 Integer ID 编号
Data.CreatedAt 2023-09-21T12:02:29.377+08:00 String 创建时间
Data.UpdatedAt 2023-09-21T12:02:29.377+08:00 String 更新时间
Data.DeletedAt null Null 删除时间
Data.IP 172.17.0.16 String IP 地址
Data.UserName root String 用户名
Data.Password ** String 密码
Data.SSHPort 22 Integer SSH 端口号
Data.Status Init String 主机状态
Data.OS CentOS Linux 8 String 操作系统
Data.CpuArch aarch64 String 主机架构 [x86/aarch64]
Data.CpuModel Kunpeng-920 String CPU 型号
Data.CpuCores 64 Integer CPU 信息数
Data.Memory 190 Integer 内存大小
Data.Storage 7375 Integer 存储空间,单位 GB
Data.DiskType SSD String 磁盘类型 [HDD/SSD]
Data.Stat LoadLess String 主机资源状态
Data.FreeStorage 7375 Integer 空闲存储容量,单位 GB
Data.FreeCpuCores 64 Integer 空闲 CPU 核心数量
Data.FreeMemory 190 Integer 空闲内存容量,单位 GB
Data.ClusterID - String 主机上运行的 TIDB 集群 ID
Data.Location - String 主机位置
Data.Tag - String 主机标签
Data.HostType PM String 主机类型 [PM/VM]
Success true Boolean
© 2024 平凯星辰(北京)科技有限公司 all right reserved,powered by GitbookFile Modify: 2024-04-02 15:37:04

results matching ""

    No results matching ""