You need to enable JavaScript to run this app.
Torch Log Service

Torch Log Service

Copy page
Download PDF
Host group management API
DescribeHosts
Copy page
Download PDF
DescribeHosts
Call the DescribeHosts interface to view the host list in the specified host group.​
Usage notes​
  1. This interface is used to view the host list in the specified host group. It supports pagination query, fuzzy query by host IP, and query by host heartbeat status.​
  • The call frequency limit is 20 times/s, and exceeding the frequency limit will report an error ExceedQPSLimit.​
Request syntax​
  • Request Method: GET​
  • Request URL: https://{tls-endpoint}/DescribeHosts​
Request parameters​
The table below only lists the request parameters specific to this interface and some common parameters. For more information, please see Common parameters.​
Query​
​
Name​
Type​
Required​
Example​
Description​
HostGroupId​
String​
True​
6622a14b-770f-4171-a385-3b68486f****​
The ID of the host group.​
Ip​
String​
False​
127.0.0.1​
The IP address of the host, used as a fuzzy query.​
HeartbeatStatus​
Integer​
False​
1​
The status of the host heartbeat.​
PageNumber​
Integer​
False​
1​
The page number when paging the query. The default is 1, that is, the return starts from the first page of data.​
PageSize​
Integer​
False​
20​
The page size. The default is 20, with a maximum of 100.​
​
Responses​
The table below only lists the return parameters specific to this interface. For more information, please refer to the Response message.​
​
Name​
Type​
Example​
Description​
Total​
Integer​
2​
The total number of the hosts.​
HostInfos​
Array of HostInfo​
/​
The hosts information.​
​
HostInfo​
​
Name​
Type​
Example​
Description​
Ip​
String​
127.0.0.1​
The IP address of the host.​
HeartbeatStatus​
Integer​
1​
The status of the host heartbeat.​
  • 0: Heartbeat is normal​
  • 1: Heartbeat is abnormal.​
LogCollectorVersion​
String​
1.0.11​
The version of LogCollector installed on the host.​
​
Sample Request​
​
GET https://{tls-endpoint}/DescribeHosts?HostGroupId=6622a14b-770f-4171-a385-3b68486f*****PageSize=20 HTTP/1.1​
​
Sample Response​
​
HTTP/1.1 200 OK​
Content-Type: application/json​
{​
"Total": 1,​
"HostInfos": [​
{​
"Ip": "127.0.0.1",​
"LogCollectorVersion": "logcollector-1.0.3",​
"HeartbeatStatus": 0​
}​
]​
}​
​
Error code​
The following table lists the error codes related to the interface and business logic. For common error codes, please refer to the Common error codes.​
​
HTTP status code​
Error code​
Error message​
Description​
400​
InvalidArgument​
Invalid argument key %s, value %s, please check argument.​
The parameter is invalid.​
500​
InternalServerError​
We encountered an unexpected server error, please try again later.​
Internal server error.​
​
​
​
Last updated: 2025.10.28 18:41:59