Querying the Details of a Monthly Operations Report
Function
This API is used to query the details of a monthly operations report.
Calling Method
For details, see Calling APIs.
URI
GET /v5/{project_id}/operational-report/reports/{report_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
report_id |
Yes |
String |
Definition reportId, which indicates the year and month the monthly operations report was generated. Constraints N/A Range Length: 1 to 32 characters Default Value N/A |
project_id |
Yes |
String |
Definition Project ID, which is used to specify the project that an asset belongs to. After the project ID is configured, you can query assets in the project using the project ID. For details about how to obtain it, see Obtaining a Project ID. Constraints N/A Range The value can contain 1 to 256 characters. Default Value N/A |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
operation_summary_info |
OperationSummaryInfo object |
Monthly operation summary |
protect_info |
ProtectInfo object |
Protection summary information |
risk_handle_info |
RiskHandleInfo object |
Risk handling summary |
Parameter |
Type |
Description |
---|---|---|
hss_visit_days |
Integer |
Definition Number of days when a user accesses HSS Range Minimum value: 0; maximum value: 365 |
workload_beat_rate |
Float |
Definition The percentage of users whose vulnerability or alarm handling performance is lower than the current user's performance. (The higher percentage is displayed.) Range Minimum value: 0; maximum value: 1 |
user_name |
String |
Definition Username Range Length: 0 to 128 characters |
current_month_start |
Long |
Definition Timestamp at the beginning of the current month. Range Minimum value: 0; maximum value: 9223372036854775807 |
current_month_end |
Long |
Definition Timestamp at the end of the current month. Range Minimum value: 0; maximum value: 9223372036854775807 |
handled_security_event_num |
Long |
Definition Number of handled security events. Range Minimum value: 0; maximum value: 2147483647 |
total_workload_beat_rate |
Float |
Definition The percentage of users whose security issue handling performance is lower than the current user's performance. Range Minimum value: 0; maximum value: 1 |
title |
String |
Definition Title Range
|
report_id |
String |
Definition Time string. Range Length: 0 to 32 characters |
current_month |
Integer |
Definition Current month. Range Minimum value: 1; maximum value: 12 |
work |
String |
Definition Handled security issue type. (The type with the highest percentage of users whose performance is lower than the current user's performance is displayed.) Range -vul-fix: vulnerability fixing
|
create_time |
Long |
Definition Report generation timestamp. Range Minimum value: 0; maximum value: 9223372036854775807 |
Parameter |
Type |
Description |
---|---|---|
cover_area_info |
cover_area_info object |
Protection coverage information |
config_info |
config_info object |
Protection configuration information |
quota_info |
quota_info object |
Protection quota information |
Parameter |
Type |
Description |
---|---|---|
protect_host_num |
Integer |
Definition Number of protected servers. Range Minimum value: 0; maximum value: 2147483647 |
un_protect_host_num |
Integer |
Definition Number of unprotected servers. Range Minimum value: 0; maximum value: 2147483647 |
protect_rate |
Float |
Definition Protection rate. Range Minimum value: 0; maximum value: 1 |
beat_rate |
Float |
Definition Percentage of users whose performance is lower than the current user's performance. Range Minimum value: 0; maximum value: 1 |
Parameter |
Type |
Description |
---|---|---|
un_upgrade_agent_host_num |
Integer |
Definition Number of servers where the agent is not upgraded. Range Minimum value: 0; maximum value: 2147483647 |
auto_upgrade_agent_enable |
Boolean |
Definition Whether to enable automatic upgrade. Range
|
user_open_auto_upgrade_agent_rate |
Float |
Definition Percentage of users who enabled automatic upgrade. Range Minimum value: 0; maximum value: 1 |
un_open_ransomware_policy_host_num |
Integer |
Definition Number of servers where no ransomware prevention policies are enabled. Range Minimum value: 0; maximum value: 2147483647 |
to_be_optimized_ransomware_policy_host_num |
Integer |
Definition Number of servers where ransomware prevention is not enabled (to be optimized). Range Minimum value: 0; maximum value: 2147483647 |
user_open_ransomware_backup_rate |
Float |
Definition Percentage of users who enabled backup. Range Minimum value: 0; maximum value: 1 |
un_open_two_factor_login_host_num |
Integer |
Definition Number of servers where 2FA is not enabled. Range Minimum value: 0; maximum value: 2147483647 |
user_open_two_factor_login_rate |
Float |
Definition Percentage of users who enabled 2FA. Range Minimum value: 0; maximum value: 1 |
un_virus_kill_host_num |
Integer |
Definition Number of servers where no virus scan is performed. Range Minimum value: 0; maximum value: 2147483647 |
virus_kill_host_num |
Integer |
Definition Number of servers where virus scan is performed. Range Minimum value: 0; maximum value: 2147483647 |
malware_collect_enable |
Boolean |
Definition Whether cloud scan is enabled. Range
|
user_open_malware_collect_rate |
Float |
Definition Percentage of users who enabled cloud scan. Range Minimum value: 0; maximum value: 1 |
container_image_scan_freq |
Float |
Definition Container image scan frequency. Range Minimum value: 0; maximum value: 128 |
container_image_scan_freq_beat_rate |
Float |
Definition Percentage of users whose container image scan frequency is lower than the current user's frequency. Range Minimum value: 0; maximum value: 1 |
need_open_config_num |
Integer |
Definition Number of enabled settings. Range Minimum value: 0; maximum value: 2147483647 |
container_image_scan_total_num |
Long |
Definition Number of scanned images. Range Minimum value: 0; maximum value: 2147483647 |
Parameter |
Type |
Description |
---|---|---|
expired_quota_num |
Integer |
Definition Expired quota Range Minimum value: 0; maximum value: 2147483647 |
about_to_expire_quota_num |
Integer |
Definition Quota that is about to expire Range Minimum value: 0; maximum value: 2147483647 |
user_use_enterprise_rate |
Float |
Definition Percentage of users using the enterprise edition Range Minimum value: 0; maximum value: 1 |
Parameter |
Type |
Description |
---|---|---|
free_report_info |
free_report_info object |
Free health check report information |
vul_info |
vul_info object |
Vulnerability details |
base_line_info |
base_line_info object |
Baseline information |
alarm_info |
alarm_info object |
Alarm Information |
Parameter |
Type |
Description |
---|---|---|
free_check_host_num |
Long |
Definition Number of servers that use free health check Range Minimum value: 0; maximum value: 2147483647 |
Parameter |
Type |
Description |
---|---|---|
vul_scan_task_num |
Integer |
Definition Number of vulnerability scan tasks Range Minimum value: 0; maximum value: 2147483647 |
vul_num |
Long |
Definition Number of detected vulnerabilities Range Minimum value: 0; maximum value: 2147483647 |
handled_vul_num |
Long |
Definition Number of handled vulnerabilities Range Minimum value: 0; maximum value: 2147483647 |
handled_rate |
Float |
Definition Handling rate Range Minimum value: 0; maximum value: 1 |
beat_rate |
Float |
Definition Percentage of users whose issue handling rate is lower than the current user's rate. Range Minimum value: 0; maximum value: 1 |
new_urgent_vul_num |
Integer |
Definition Number of new emergency vulnerabilities Range Minimum value: 0; maximum value: 2147483647 |
Parameter |
Type |
Description |
---|---|---|
config_risk_host_num |
Long |
Definition Number of Servers with unsafe settings Range Minimum value: 0; maximum value: 2147483647 |
config_risk_num |
Long |
Definition Number of unsafe settings Range Minimum value: 0; maximum value: 2147483647 |
passed_rate |
Float |
Definition Pass rate Range Minimum value: 0; maximum value: 1 |
beat_rate |
Float |
Definition Percentage of users whose check passing rate is lower than the current user's rate. Range Minimum value: 0; maximum value: 1 |
weak_pwd_num |
Long |
Definition Number of weak passwords Range Minimum value: 0; maximum value: 2147483647 |
passed_num |
Long |
Definition Number of safe items. Range Minimum value: 0; maximum value: 2147483647 |
total_config_risk_num |
Long |
Definition Total number of risks Range Minimum value: 0; maximum value: 2147483647 |
version_recommend |
String |
Definition Recommended edition. Only the enterprise edition (hss.version.enterprise) is supported. Range Length: 1 to 32 characters |
Parameter |
Type |
Description |
---|---|---|
alarm_num |
Long |
Definition Number of attacks and abnormal behaviors. Range Minimum value: 0; maximum value: 2147483647 |
malware_file_num |
Long |
Definition Number of virus files. Range Minimum value: 0; maximum value: 2147483647 |
auto_block_num |
Long |
Definition Number of blocked items. Range Minimum value: 0; maximum value: 2147483647 |
manual_handle_num |
Long |
Definition Number of manually handled items. Range Minimum value: 0; maximum value: 2147483647 |
auto_handle_num |
Long |
Definition Number of automatically handled items. Range Minimum value: 0; maximum value: 2147483647 |
handle_rate |
Float |
Definition Average handling rate. Range Minimum value: 0; maximum value: 1 |
beat_rate |
Float |
Definition Percentage of users whose average handling rate is lower than the current user's rate. Range Minimum value: 0; maximum value: 1 |
virus_kill_config_enable |
Boolean |
Definition Whether to enable isolation and killing. Range
|
user_open_virus_kill_rate |
Float |
Definition Percentage of users who enabled isolation and killing. Range Minimum value: 0; maximum value: 1 |
alarm_notify_config_enable |
Boolean |
Definition Whether to enable alarm notifications. Range
|
user_open_alarm_notify_rate |
Float |
Definition Percentage of users who enabled alarm notifications. Range Minimum value: 0; maximum value: 1 |
ransomware_event_num |
Long |
Definition Number of ransomware attacks Range Minimum value: 0; maximum value: 2147483647 |
ransomware_event_host_list |
Array of strings |
Definition List of servers under ransomware attacks Range Minimum value: 0; maximum value: 10000 |
Example Requests
Query the monthly operations report of a user.
GET https://{endpoint}/v5/{project_id}/operational-report/reports/{report_id}
Example Responses
Status code: 200
Operations report details.
{ "operation_summary_info" : { "hss_visit_days" : 31, "workload_beat_rate" : 0.99, "user_name" : "scc_hss_g00840938_01", "current_month_start" : 1753977600000, "current_month_end" : 1756655999999, "handled_security_event_num" : 2025, "total_workload_beat_rate" : 0.974359, "title" : "malware-file", "report_id" : "2025-08", "current_month" : 8, "work" : "event-handle", "create_time" : 1756659606563 }, "protect_info" : { "cover_area_info" : { "protect_host_num" : 32, "un_protect_host_num" : 128, "protect_rate" : 0.2, "beat_rate" : 0.61538464 }, "config_info" : { "un_upgrade_agent_host_num" : 3, "auto_upgrade_agent_enable" : false, "user_open_auto_upgrade_agent_rate" : 0.5641026, "un_open_ransomware_policy_host_num" : 0, "to_be_optimized_ransomware_policy_host_num" : 0, "user_open_ransomware_backup_rate" : 0.5, "un_open_two_factor_login_host_num" : 43, "user_open_two_factor_login_rate" : 0.51282054, "un_virus_kill_host_num" : 147, "virus_kill_host_num" : 0, "malware_collect_enable" : true, "user_open_malware_collect_rate" : 0.5641026, "container_image_scan_freq" : 3.7, "container_image_scan_freq_beat_rate" : 0.974359, "need_open_config_num" : 4, "container_image_scan_total_num" : 776 }, "quota_info" : { "about_to_expire_quota_num" : 0, "user_use_enterprise_rate" : 0.5897436 } }, "risk_handle_info" : { "free_report_info" : { "free_check_host_num" : 1 }, "vul_info" : { "vul_scan_task_num" : 70, "vul_num" : 4451, "handled_vul_num" : 47, "handled_rate" : 0.010559425, "beat_rate" : 0.974359, "new_urgent_vul_num" : 0 }, "base_line_info" : { "config_risk_host_num" : 22, "config_risk_num" : 652, "passed_rate" : 0.6819512, "beat_rate" : 0.71794873, "weak_pwd_num" : 11, "passed_num" : 1398, "total_config_risk_num" : 2050, "version_recommend" : "hss.version.enterprise" }, "alarm_info" : { "alarm_num" : 14576, "malware_file_num" : 1687, "auto_block_num" : 110, "manual_handle_num" : 470, "auto_handle_num" : 1716, "handle_rate" : 0.13441554, "beat_rate" : 0.974359, "virus_kill_config_enable" : true, "user_open_virus_kill_rate" : 0.5641026, "alarm_notify_config_enable" : false, "user_open_alarm_notify_rate" : 0.53846157, "ransomware_event_num" : 1831, "ransomware_event_host_list" : [ "15695431-xxxx-xxxx-xxxx-f3e69716f", "4f3388da-xxxx-xxxx-xxxx-9d559bc91112" ] } } }
SDK Sample Code
The SDK sample code is as follows.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
package com.huaweicloud.sdk.test; import com.huaweicloud.sdk.core.auth.ICredential; import com.huaweicloud.sdk.core.auth.BasicCredentials; import com.huaweicloud.sdk.core.exception.ConnectionException; import com.huaweicloud.sdk.core.exception.RequestTimeoutException; import com.huaweicloud.sdk.core.exception.ServiceResponseException; import com.huaweicloud.sdk.hss.v5.region.HssRegion; import com.huaweicloud.sdk.hss.v5.*; import com.huaweicloud.sdk.hss.v5.model.*; public class ShowMonthlyOperationReportDetailSolution { public static void main(String[] args) { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment String ak = System.getenv("CLOUD_SDK_AK"); String sk = System.getenv("CLOUD_SDK_SK"); String projectId = "{project_id}"; ICredential auth = new BasicCredentials() .withProjectId(projectId) .withAk(ak) .withSk(sk); HssClient client = HssClient.newBuilder() .withCredential(auth) .withRegion(HssRegion.valueOf("<YOUR REGION>")) .build(); ShowMonthlyOperationReportDetailRequest request = new ShowMonthlyOperationReportDetailRequest(); request.withReportId("{report_id}"); try { ShowMonthlyOperationReportDetailResponse response = client.showMonthlyOperationReportDetail(request); System.out.println(response.toString()); } catch (ConnectionException e) { e.printStackTrace(); } catch (RequestTimeoutException e) { e.printStackTrace(); } catch (ServiceResponseException e) { e.printStackTrace(); System.out.println(e.getHttpStatusCode()); System.out.println(e.getRequestId()); System.out.println(e.getErrorCode()); System.out.println(e.getErrorMsg()); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# coding: utf-8 import os from huaweicloudsdkcore.auth.credentials import BasicCredentials from huaweicloudsdkhss.v5.region.hss_region import HssRegion from huaweicloudsdkcore.exceptions import exceptions from huaweicloudsdkhss.v5 import * if __name__ == "__main__": # The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. # In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak = os.environ["CLOUD_SDK_AK"] sk = os.environ["CLOUD_SDK_SK"] projectId = "{project_id}" credentials = BasicCredentials(ak, sk, projectId) client = HssClient.new_builder() \ .with_credentials(credentials) \ .with_region(HssRegion.value_of("<YOUR REGION>")) \ .build() try: request = ShowMonthlyOperationReportDetailRequest() request.report_id = "{report_id}" response = client.show_monthly_operation_report_detail(request) print(response) except exceptions.ClientRequestException as e: print(e.status_code) print(e.request_id) print(e.error_code) print(e.error_msg) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
package main import ( "fmt" "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic" hss "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/hss/v5" "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/hss/v5/model" region "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/hss/v5/region" ) func main() { // The AK and SK used for authentication are hard-coded or stored in plaintext, which has great security risks. It is recommended that the AK and SK be stored in ciphertext in configuration files or environment variables and decrypted during use to ensure security. // In this example, AK and SK are stored in environment variables for authentication. Before running this example, set environment variables CLOUD_SDK_AK and CLOUD_SDK_SK in the local environment ak := os.Getenv("CLOUD_SDK_AK") sk := os.Getenv("CLOUD_SDK_SK") projectId := "{project_id}" auth := basic.NewCredentialsBuilder(). WithAk(ak). WithSk(sk). WithProjectId(projectId). Build() client := hss.NewHssClient( hss.HssClientBuilder(). WithRegion(region.ValueOf("<YOUR REGION>")). WithCredential(auth). Build()) request := &model.ShowMonthlyOperationReportDetailRequest{} request.ReportId = "{report_id}" response, err := client.ShowMonthlyOperationReportDetail(request) if err == nil { fmt.Printf("%+v\n", response) } else { fmt.Println(err) } } |
For SDK sample code of more programming languages, see the Sample Code tab in API Explorer. SDK sample code can be automatically generated.
Status Codes
Status Code |
Description |
---|---|
200 |
Operations report details. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot