方法: GET
PATH: /api/trusteeships/suid/{suid}
cURL示例:
curl 'https://localhost:9931/api/trusteeships/suid/{suid}' \
-H 'Authorization:Bearer UHUzcGhDY29JTnZSbGpxZm1EOU......'
响应参数:
参数 | 类型 | 说明 | 示例 |
---|---|---|---|
request_id | [string] | 请求ID | |
body | [object] | 数据 | |
body.sn | [string] | 设备SN | |
body.model | [string] | 设备型号 | SR530 |
body.spec_code | [string] | 设备的规格编号 | 1u |
设备的模板编号 | centos76 | body.height | |
body.ipmi_ip_id | [number] | 设备绑定的内网IP ID | |
body.edges | [object] | 设备的关联信息 | |
body.edges.room.name | [string] | 机房名 | 安溪 |
body.edges.room.admin_user | [string] | 机房API用户名 | cloudinstall |
机房API密码 | nXk79wGYWOEZLNSA | body.edges.room.address | |
body.edges.room.tel | [string] | 机房管理员电话 | |
body.edges.room.activated | [boolean] | 机房是否已经激活 | true |
设备的机柜 | body.edges.cabinet.id | ||
body.edges.cabinet.room_id | [number] | 机柜所在机房ID | 257 |
body.edges.cabinet.u_surplus | [number] | 机柜当前可用的U数,该参数将在不久后删除 | |
托管的最大台数 | 48 | body.edges.cabinet.trusteeship_per_max_unit | |
机柜电源 | body.edges.cabinet.enabled | ||
body.edges.public_ip | [array] | 公网IP | |
body.edges.public_ip.room_id | [number] | IP所在的机房ID | 257 |
body.edges.public_ip.parent_id | [number] | IP的父IP ID | |
body.edges.public_ip.vlan | [number] | IP所在的VLAN | 101 |
body.edges.public_ip.gateway | [string] | 网关 | 125.77.172.1 |
body.edges.public_ip.dns2 | [string] | DNS2 | 8.8.8.8 |
body.edges.public_ip.bind_type | [string] | IP绑定类型,’node’, ‘trusteeship’, ‘network’, ‘free’ 节点 托管 网络设备 空闲 | trusteeship |
body.edges.public_ip.bind_node_id | [number] | IP绑定的节点IP | |
body.edges.public_ip.bind_trusteeship_id | [number] | 绑定的托管设备ID | 2351 |
body.edges.public_ip.edges | [object] |
响应示例:
{
"request_id": "b6462f75-9fe9-49ce-8720-9f0a8748b143",
"body": {
"id": 2351,
"label": "gWCpsx5W",
"suid": "gWCpsx5W",
"sn": "",
"asset_number": "MB625",
"brand": "lenovo",
"model": "SR530",
"port_id": 0,
"room_id": 257,
"spec_code": "1u",
"cabinet_id": 51,
"template_code": "centos76",
"height": 1,
"ip_number": 1,
"bandwidth": 50,
"ipmi_ip_id": 0,
"ipmi_user": "",
"ipmi_password": "",
"edges": {
"room": {
"id": 257,
"name": "安溪",
"url": "http://ec.qg.net:9931",
"admin_user": "cloudinstall",
"admin_passwd": "",
"address": "",
"director": "",
"tel": "0",
"vlan": "100",
"activated": true,
"edges": {}
},
"cabinet": {
"id": 51,
"name": "1-2-A02",
"room_id": 257,
"u_sum": 48,
"u_surplus": 0,
"trusteeship_max_unit": 48,
"trusteeship_per_max_unit": 48,
"power": "",
"enabled": true,
"edges": {}
},
"public_ip": [
{
"id": 4885,
"room_id": 257,
"pool_id": 49,
"parent_id": 0,
"addr": "125.77.172.217",
"vlan": 101,
"mask": "255.255.255.0",
"gateway": "125.77.172.1",
"dns1": "114.114.114.114",
"dns2": "8.8.8.8",
"enabled": true,
"bind_type": "trusteeship",
"bind_node_id": 0,
"bind_network_id": 0,
"bind_trusteeship_id": 2351,
"remark": "",
"edges": {}
}
]
}
}
}