此操作用来查询HBlock信息,包括HBlock ID、HBlock名称、HBlock序列号、服务器数量、故障域(集群版)、初始化时间、试用期信息及HBlock的管理员用户名。
请求语法
GET /rest/v1/system/info HTTP/1.1
Date: date
Host: ip:port
Authorization: authorization
响应结果
名称 描述 storId HBlock ID。 storName HBlock的名称。 serialId HBlock序列号。 serverNumbers HBlock服务器数量。 basePoolName 基础存储池的名字(仅集群版)。 faultDomain 故障域类型(仅集群版):
rack:机架级别的故障域。
room:机房级别的故障域。
server:服务器级别的故障域。
path:数据目录级别的故障域。
setupTime 系统初始化时间。unix时间戳(UTC),精确到毫秒。 trialStatus 试用期标识:
Trial:处于试用期内,未导入软件许可证。
TrialExpired:试用期已过,未导入软件许可证。
NonTrialVersion:非试用版本,已导入软件许可证。
trialExpireTime 试用期到期时间。unix时间戳(UTC),精确到毫秒。 userName HBlock的管理员用户名。
请求示例1
单机版:查询HBlock信息。
GET /rest/v1/system/info HTTP/1.1
Date: Tue, 6 Aug 2024 08:41:41 GMT
Authorization: HBlock userName:signature
Host: 192.168.0.32:1443
响应示例1
HTTP/1.1 200 OK
x-hblock-request-id: 62d8830817844ebba996c0b195bff655
Connection: keep-alive
Content-Length: 269
Date: Tue,
6 Aug 2024 08: 41: 41 GMT
Content-Type: application/json;charset=utf-8
Server: HBlock
{
"data": {
"storId": "D28969D0-376B-4BCC-B976-200E500802DB",
"storName": "stor2",
"serialId": "D28969D0-376B-4BCC-B976-200E500802DB-0201-030700",
"serverNumbers": 1,
"setupTime": 1722587327264,
"trialStatus": "NonTrialVersion",
"trialExpireTime": 1725179327264,
"userName": "storuser"
}
}
请求示例2
集群版:查询HBlock信息。
GET /rest/v1/system/info HTTP/1.1
Date: Tue, 6 Aug 2024 08:39:16 GMT
Authorization: HBlock userName:signature
Host:192.168.0.110:1443
响应示例2
HTTP/1.1 200 OK
x-hblock-request-id: 1b0d2c47fbb04475940bc7756f3ef36d
Connection: keep-alive
Content-Length: 306
Date: Tue, 6 Aug 2024 08:39:16 GMT
Content-Type: application/json;charset=utf-8
Server: HBlock
{
"data": {
"storId": "6DCDE5A5-B0EE-496B-9C1A-6013CDBD844B",
"storName": "stor",
"serialId": "6DCDE5A5-B0EE-496B-9C1A-6013CDBD844B-0202-030700",
"serverNumbers": 4,
"basePoolName": "default",
"faultDomain": "server",
"setupTime": 1722494887405,
"trialStatus": "Trial",
"trialExpireTime": 1725086887405,
"userName": "storuser"
}
}