文档首页/ 企业主机安全 HSS/ API参考/ API说明/ 总览/ 查询某月月度运营报告的详细信息
更新时间:2025-09-26 GMT+08:00
分享

查询某月月度运营报告的详细信息

功能介绍

查询某月月度运营报告的详细信息

调用方法

请参见如何调用API

URI

GET /v5/{project_id}/operational-report/reports/{report_id}

表1 路径参数

参数

是否必选

参数类型

描述

report_id

String

参数解释:

reportId,生成的月度运营报告年月

约束限制:

不涉及

取值范围:

字符长度1-32位

默认取值:

不涉及

project_id

String

参数解释:

项目ID,用于明确项目归属,配置后可通过该ID查询项目下资产。获取方式请参见获取项目ID

约束限制:

不涉及

取值范围:

字符长度1-256位

默认取值:

不涉及

请求参数

响应参数

状态码:200

表2 响应Body参数

参数

参数类型

描述

operation_summary_info

OperationSummaryInfo object

月度运营总结信息

protect_info

ProtectInfo object

防护小结信息

risk_handle_info

RiskHandleInfo object

风险处置小结信息

表3 OperationSummaryInfo

参数

参数类型

描述

hss_visit_days

Integer

参数解释:

用户访问HSS天数

取值范围:

最小值0,最大值365

workload_beat_rate

Float

参数解释:

某个工作超过的用户百分比(目前只有漏洞或告警,哪个打败的用户占比高,显示哪个)

取值范围:

最小值0,最大值1

user_name

String

参数解释:

用户名

取值范围:

字符长度0-128位

current_month_start

Long

参数解释:

当前月初时间戳

取值范围:

最小值0,最大值9223372036854775807

current_month_end

Long

参数解释:

当前月末时间戳

取值范围:

最小值0,最大值9223372036854775807

handled_security_event_num

Long

参数解释:

处置的安全事件条数

取值范围:

最小值0,最大值2147483647

total_workload_beat_rate

Float

参数解释:

安全问题处理性能低于当前用户的百分比。

取值范围:

最小值0,最大值1

title

String

参数解释:

称号

取值范围:

-vul-fix-master: 补洞大师。

-vul-fix-expert: 漏洞修复小能手。

-baseline-handle: 风险配置处置高手。

-malware-file: 防病毒先锋。

-ransomware-event: 防勒索达人。

-web-tamper-event: 网站守卫。

report_id

String

参数解释:

时间字符串

取值范围:

字符长度0-32位

current_month

Integer

参数解释:

当前月份

取值范围:

最小值1,最大值12

work

String

参数解释:

处理的安全问题类型。(显示性能低于当前用户性能的用户百分比最高的类型。)

取值范围:

-vul-fix: 漏洞修复

-baseline-handle: 基线处置

-event-handle: 处置入侵事件

create_time

Long

参数解释:

报告生成时间戳

取值范围:

最小值0,最大值9223372036854775807

表4 ProtectInfo

参数

参数类型

描述

cover_area_info

cover_area_info object

防护覆盖面信息

config_info

config_info object

防护配置信息

quota_info

quota_info object

防护配额信息

表5 cover_area_info

参数

参数类型

描述

protect_host_num

Integer

参数解释:

防护主机数量

取值范围:

最小值0,最大值2147483647

un_protect_host_num

Integer

参数解释:

未防护主机数量

取值范围:

最小值0,最大值2147483647

protect_rate

Float

参数解释:

防护率

取值范围:

最小值0,最大值1

beat_rate

Float

参数解释:

击败用户率

取值范围:

最小值0,最大值1

表6 config_info

参数

参数类型

描述

un_upgrade_agent_host_num

Integer

参数解释:

未升级agent的主机数

取值范围:

最小值0,最大值2147483647

auto_upgrade_agent_enable

Boolean

参数解释:

是否开启自动升级

取值范围:

  • true:是。

  • false:否。

user_open_auto_upgrade_agent_rate

Float

参数解释:

开启自动升级的用户率

取值范围:

最小值0,最大值1

un_open_ransomware_policy_host_num

Integer

参数解释:

未开启勒索策略的主机数

取值范围:

最小值0,最大值2147483647

to_be_optimized_ransomware_policy_host_num

Integer

参数解释:

未待开启(待优化)勒索病毒防护的主机数

取值范围:

最小值0,最大值2147483647

user_open_ransomware_backup_rate

Float

参数解释:

开启勒索备份的用户率

取值范围:

最小值0,最大值1

un_open_two_factor_login_host_num

Integer

参数解释:

未开启双因子的主机数

取值范围:

最小值0,最大值2147483647

user_open_two_factor_login_rate

Float

参数解释:

开启双因子的用户率

取值范围:

最小值0,最大值1

un_virus_kill_host_num

Integer

参数解释:

未执行病毒查杀的主机数

取值范围:

最小值0,最大值2147483647

virus_kill_host_num

Integer

参数解释:

执行过病毒查杀的主机数

取值范围:

最小值0,最大值2147483647

malware_collect_enable

Boolean

参数解释:

是否开启云查

取值范围:

  • true:是。

  • false:否。

user_open_malware_collect_rate

Float

参数解释:

开启云查的用户率

取值范围:

最小值0,最大值1

container_image_scan_freq

Float

参数解释:

容器镜像扫描频率

取值范围:

最小值0,最大值128

container_image_scan_freq_beat_rate

Float

参数解释:

容器镜像扫描频率击败的用户率

取值范围:

最小值0,最大值1

need_open_config_num

Integer

参数解释:

用户开启的配置数量

取值范围:

最小值0,最大值2147483647

container_image_scan_total_num

Long

参数解释:

扫描的镜像数

取值范围:

最小值0,最大值2147483647

表7 quota_info

参数

参数类型

描述

expired_quota_num

Integer

参数解释:

已经到期的配额

取值范围:

最小值0,最大值2147483647

about_to_expire_quota_num

Integer

参数解释:

即将到期的配额

取值范围:

最小值0,最大值2147483647

user_use_enterprise_rate

Float

参数解释:

使用企业版的用户率

取值范围:

最小值0,最大值1

表8 RiskHandleInfo

参数

参数类型

描述

free_report_info

free_report_info object

免费体检报告信息

vul_info

vul_info object

漏洞信息

base_line_info

base_line_info object

基线信息

alarm_info

alarm_info object

告警信息

表9 free_report_info

参数

参数类型

描述

free_check_host_num

Long

参数解释:

免费体检服务器数量

取值范围:

最小值0,最大值2147483647

表10 vul_info

参数

参数类型

描述

vul_scan_task_num

Integer

参数解释:

漏洞扫描任务次数

取值范围:

最小值0,最大值2147483647

vul_num

Long

参数解释:

发现的漏洞数

取值范围:

最小值0,最大值2147483647

handled_vul_num

Long

参数解释:

已经处置的漏洞数

取值范围:

最小值0,最大值2147483647

handled_rate

Float

参数解释:

处置率

取值范围:

最小值0,最大值1

beat_rate

Float

参数解释:

处置率击败的用户率

取值范围:

最小值0,最大值1

new_urgent_vul_num

Integer

参数解释:

新增应急漏洞数

取值范围:

最小值0,最大值2147483647

表11 base_line_info

参数

参数类型

描述

config_risk_host_num

Long

参数解释:

存在配置风险的主机数

取值范围:

最小值0,最大值2147483647

config_risk_num

Long

参数解释:

存在的配置风险数

取值范围:

最小值0,最大值2147483647

passed_rate

Float

参数解释:

通过率

取值范围:

最小值0,最大值1

beat_rate

Float

参数解释:

通过率击败的用户率

取值范围:

最小值0,最大值1

weak_pwd_num

Long

参数解释:

弱口令数

取值范围:

最小值0,最大值2147483647

passed_num

Long

参数解释:

通过量

取值范围:

最小值0,最大值2147483647

total_config_risk_num

Long

参数解释:

总的风险数

取值范围:

最小值0,最大值2147483647

version_recommend

String

参数解释:

推荐版本,只支持企业版 hss.version.enterprise

取值范围:

字符长度1-32位

表12 alarm_info

参数

参数类型

描述

alarm_num

Long

参数解释:

攻击、异常行为数

取值范围:

最小值0,最大值2147483647

malware_file_num

Long

参数解释:

病毒文件数

取值范围:

最小值0,最大值2147483647

auto_block_num

Long

参数解释:

阻断的数量

取值范围:

最小值0,最大值2147483647

manual_handle_num

Long

参数解释:

手工处置数量

取值范围:

最小值0,最大值2147483647

auto_handle_num

Long

参数解释:

自动处置数量

取值范围:

最小值0,最大值2147483647

handle_rate

Float

参数解释:

平均处置率

取值范围:

最小值0,最大值1

beat_rate

Float

参数解释:

平均处置率击败的用户率

取值范围:

最小值0,最大值1

virus_kill_config_enable

Boolean

参数解释:

是否开启隔离查杀

取值范围:

  • true:是。

  • false:否。

user_open_virus_kill_rate

Float

参数解释:

开启隔离查杀的用户率

取值范围:

最小值0,最大值1

alarm_notify_config_enable

Boolean

参数解释:

是否开启告警通知

取值范围:

  • true:是。

  • false:否。

user_open_alarm_notify_rate

Float

参数解释:

开启告警通知的用户率

取值范围:

最小值0,最大值1

ransomware_event_num

Long

参数解释:

勒索病毒攻击数量

取值范围:

最小值0,最大值2147483647

ransomware_event_host_list

Array of strings

参数解释:

存在勒索病毒攻击的主机列表

取值范围:

最小值0,最大值10000

请求示例

查询租户的月度运营报告

GET https://{endpoint}/v5/{project_id}/operational-report/reports/{report_id}

响应示例

状态码:200

运营报告详细信息

{
  "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代码示例

SDK代码示例如下。

 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)
    }
}

更多编程语言的SDK代码示例,请参见API Explorer的代码示例页签,可生成自动对应的SDK代码示例。

状态码

状态码

描述

200

运营报告详细信息

错误码

请参见错误码

相关文档