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

Torch Log Service

Copy page
Download PDF
Host group management API
DescribeHostGroupsV2
Copy page
Download PDF
DescribeHostGroupsV2
Call the DescribeHostGroupsV2 API to retrieve all host group information, excluding group heartbeat status and the list of associated collection rules.​
Supports paginated queries and fuzzy searches by host group name or host group ID, but only one criterion can be provided for each query.​
Precautions​
If you use a self-built permission policy, you need to configure the tls:DescribeHostGroups permission operation for the log service resource. For more information, see Authorized operations.​
Request instructions​
  • Request method: GET​
  • Request URL: https://{tls-endpoint}/DescribeHostGroupsV2​
Request parameters​
The following table lists request parameters specific to this API and some common parameters. For more information, see Public parameters.​
Query​
​
Parameters​
Type​
Required​
Example value​
Description​
HostGroupId​
String​
No​
6622a14b-770f-4171-a385-3b68486f****​
ID of the host group; supports fuzzy search.​
HostGroupName​
String​
No​
mgn1​
Host group name; supports fuzzy search.​
AutoUpdate​
Boolean​
No​
true​
Whether the auto upgrade feature is enabled.​
  • true: Enabled​
  • false: Disabled.​
HostIdentifier​
String​
No​
test​
Host group identifier.​
IamProjectName​
String​
No​
default​
The access control project name identifies the IAM project to which the host group belongs. The default value is default.​
ServiceLogging​
Boolean​
No​
true​
Service log feature enabled.​
  • true: Enable​
  • false: Disable.​
PageNumber​
Integer​
No​
1​
Page number for pagination queries. Default is 1, meaning data will be returned starting from the first page.​
PageSize​
Integer​
No​
20​
Maximum number of host groups returned per page for pagination queries. Default value is 20.​
Hidden​
Boolean​
No​
true​
Hide host groups in dedicated resources​
  • true: Hide​
  • false: Do not hide​
​
Return parameters​
The following table lists only the unique return parameters for this API. For more information, see Return structure.​
​
Parameters​
Type​
Example value​
Description​
HostGroupHostsRulesInfos​
/​
Host group information list.​
Total​
Integer​
100​
Total number of eligible host groups​
​
HostGroupHostsRulesInfoV2​
​
Parameters​
Type​
Example value​
Description​
HostGroupInfo​
Object of HostGroupInfo​
/​
Host group information.​
​
HostGroupInfo​
​
Parameters​
Type​
Example value​
Description​
HostCount​
Integer​
2​
Number of machines.​
RuleCount​
Integer​
1​
Number of bound collection configurations.​
AutoUpdate​
Boolean​
true​
LogCollector installed on the host group server has auto-upgrade function. You can choose whether to enable it.​
  • true: TLS checks for upgrades during the specified period each day. If the conditions are met, LogCollector upgrades automatically without manual intervention.​
  • false: (default) LogCollector does not upgrade automatically. To use a newer version, refer to Upgrade LogCollector.​
CreateTime​
String​
2021-08-18 13:32:23​
Host group creation time.​
ModifyTime​
String​
2021-08-18 13:32:23​
Host group modification time.​
HostGroupId​
String​
0fd**********​
Host group ID.​
HostGroupName​
String​
testname​
Name of the host group.​
HostGroupType​
String​
IP​
The type of host group.​
  • IP: Machine IP.​
  • Label: Host identification.​
UpdateEndTime​
String​
"02:00"​
End time of LogCollector auto upgrade.​
HostIdentifier​
String​
label​
Machine identifier.​
IamProjectName​
String​
default​
The IAM project to which the host group belongs.​
ServiceLogging​
Boolean​
true​
Enable Logcollector service log functionality.​
  • true: enabled.​
  • false: (default) disabled.​
UpdateStartTime​
String​
"00:00"​
Start time of LogCollector auto upgrade.​
tip​
  • Required only when AutoUpdate is set to true.​
  • For automatic upgrades, we recommend that you set it during off-peak business hours. LogCollector may restart during the upgrade, but no logs will be lost.​
AgentLatestVersion​
String​
"2.3.4"​
Latest version number of LogCollector released by TLS​
NormalHeartbeatStatusCount​
Integer​
1​
Number of machines with normal heartbeat.​
AbnormalHeartbeatStatusCount​
Integer​
1​
Number of machines with heartbeat anomalies.​
​
Sample request​
​
GET https://{tls-endpoint}/DescribeHostGroupsV2?&HostGroupId=6622a14b-770f-4171-a385-3b68486f****&HostGroupName=mgn1&AutoUpdate=true&HostIdentifier=test&IamProjectName=default&ServiceLogging=true&PageNumber=1&PageSize=20&Hidden=true HTTP/1.1​
Content-Type: application/json​
​
Sample response​
​
Content-Type: application/json; charset=utf-8​
{​
"HostGroupHostsRulesInfos": [​
{​
"HostGroupInfo": {​
"HostCount": 2,​
"RuleCount": 1,​
"AutoUpdate": true,​
"CreateTime": "2021-08-18 13:32:23",​
"ModifyTime": "2021-08-18 13:32:23",​
"HostGroupId": "0fd**********",​
"HostGroupName": "testname",​
"HostGroupType": "IP",​
"UpdateEndTime": "02:00",​
"HostIdentifier": "label",​
"IamProjectName": "default",​
"ServiceLogging": true,​
"UpdateStartTime": "00:00",​
"AgentLatestVersion": "2.3.4",​
"NormalHeartbeatStatusCount": 1,​
"AbnormalHeartbeatStatusCount": 1​
}​
}​
],​
"Total": 100​
}​
​
Error Code​
You can visit Common Error Codes for more information.​
Last updated: 2026.07.08 15:45:25