批量查询iSCSI target 请求示例2 集群版:查询iSCSI target名称中包含target0,且关联的卷名称包含lun0的iSCSI target,且只列出第1个到第3个的查询结果。 plaintext GET /rest/v1/block/target?filtertargetName:target0 and lunName:lun0&range13 HTTP/1.1 Date: Thu, 24 Jul 2025 08:24:26 GMT Authorization: HBlock userName:signature Host: 192.168.0.64:1443 响应示例2 plaintext HTTP/1.1 200 OK xhblockrequestid: d820500731e04a03a2477fb09e2fd3fe Connection: keepalive ContentLength: 1942 Date: Thu, 24 Jul 2025 08:24:26 GMT ContentType: application/json;charsetutf8 Server: HBlock { "data": { "targets": [ { "targetName": "target0", "maxSessions": 1, "iSCSITargets": [ { "iqn": "iqn.201208.cn.ctyunapi.oos:target0.1", "ips": [ { "ip": "192.168.0.67", "port": 3260 } ], "serverId": "hblock3", "allowlist": { "initiator": [ { "IPs": [ "1.1.1.1" ] } ] } }, { "iqn": "iqn.201208.cn.ctyunapi.oos:target0.2", "ips": [ { "ip": "192.168.0.64", "port": 3260 } ], "serverId": "hblock2", "allowlist": { "initiator": [ { "IPs": [ "1.1.1.1" ] } ] } } ], "createTime": 1752111608672, "serverIds": [ "hblock2", "hblock3" ], "num": 2, "reclaimPolicy": "Delete" }, { "targetName": "target01", "maxSessions": 1, "iSCSITargets": [ { "iqn": "iqn.201208.cn.ctyunapi.oos:target01.3", "ips": [ { "ip": "192.168.0.65", "port": 3260 } ], "serverId": "hblock1" }, { "iqn": "iqn.201208.cn.ctyunapi.oos:target01.4", "ips": [ { "ip": "192.168.0.67", "port": 3260 } ], "serverId": "hblock3", "allowlist": { "target": [ { "IPs": [ "192.168.0.67" ] } ] } } ], "createTime": 1752111636790, "serverIds": [ "hblock1", "hblock3" ], "num": 2, "reclaimPolicy": "Delete" }, { "targetName": "target03", "maxSessions": 2, "iSCSITargets": [ { "iqn": "iqn.201208.cn.ctyunapi.oos:target03.5", "ips": [ { "ip": "192.168.0.67", "port": 3260 } ], "serverId": "hblock3", "allowlist": { "initiator": [ { "names": [ "iqn.199105.com.microsoft:songt0001" ], "IPs": [ "192.168.0.70" ] }, { "IPs": [ "192.168.0.66" ] } ], "target": [ { "IPs": [ "192.168.0.64" ] }, { "IPs": [ "192.168.0.65" ] }, { "IPs": [ "192.168.0.67" ] }, { "IPs": [ "192.168.0.64", "192.168.0.65", "192.168.0.67" ] }, { "IPs": [ "192.168.0.71" ] } ] } }, { "iqn": "iqn.201208.cn.ctyunapi.oos:target03.6", "ips": [ { "ip": "192.168.0.65", "port": 3260 } ], "serverId": "hblock1", "allowlist": { "initiator": [ { "names": [ "iqn.199105.com.microsoft:songt0001" ], "IPs": [ "192.168.0.70" ] }, { "IPs": [ "192.168.0.66" ] } ], "target": [ { "IPs": [ "192.168.0.64" ] }, { "IPs": [ "192.168.0.65" ] }, { "IPs": [ "192.168.0.67" ] }, { "IPs": [ "192.168.0.64", "192.168.0.65", "192.168.0.67" ] }, { "IPs": [ "192.168.0.71" ] } ] } } ], "chap": { "name": "chaptest", "status": "Disabled" }, "createTime": 1752111720420, "serverIds": [ "hblock1", "hblock3" ], "num": 2, "reclaimPolicy": "Delete" } ] } }