Help Center/ Cloud Operations Center/ API Reference/ API/ Patch management/ Obtaining a Node Compliance Report
Updated on 2025-12-05 GMT+08:00

Obtaining a Node Compliance Report

Function

This API is used to obtaining node compliance reports by page.

URI

GET /v1/patch/instance/compliant

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

enterprise_project_id

No

String

Definition:

Enterprise project ID.

Constraints:

If no, create one inEnterprise Management.

Value range:

The value is a string of 36 characters consisting of lowercase letters (a to z), digits (0 to 9), and hyphens (-). Example: c17bbc73-f1b4-7890-91f3-a3aa1234561a.

Default value:

0.

name

No

String

Definition:

Resource name, which is the name of the ECS or BMS after patch scanning or patch fixing.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

instance_id

No

String

Definition:

Resource ID, which is the ID of the ECS or BMS after patch scanning or patch fixing.

Constraints:

N/A.

Value range:

The value is a string of 36 characters consisting of lowercase letters (a to z), digits (0 to 9), and hyphens (-). Example: 8c123456-e426-4cdd-b123-4e1e36e00f99.

Default value:

N/A.

ip

No

String

Definition:

Private IP address of the ECS or BMS NIC.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

eip

No

String

Definition:

EIP of the ECS or BMS.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

operating_system

No

String

Definition:

Operating system of the ECS or BMS.

Constraints:

N/A.

Value range:

  • HuaweiCloudEulerOS

  • CentOS

  • EulerOS

Default value:

N/A.

region

No

String

Definition:

ID of the region where the ECS or BMS instance is located. For details about the mapping between region names and IDs, seeRegions and Endpoints.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

group

No

String

Definition:

Name of the application group to which the ECS or BMS instance belongs. For details about the application information, seeOverview of Application Management.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

compliant_status

No

String

Definition:

Compliance status. If the compliance report contains non-compliant patches, the compliance status is non-compliant. Otherwise, the compliance status is compliant.

Constraints:

N/A.

Value range:

  • non_compliant

  • compliant

Default value:

N/A.

order_id

No

String

Definition:

ID of the patch service ticket, which is generated when a patch scan or patch fixing service ticket is created.

Constraints:

N/A.

Value range:

The value must start with OST and be a string of 26 characters consisting of lowercase letters (a to z) and digits (0 to 9).

Default value:

N/A.

offset

No

Integer

Definition:

Offset pointers queried by page for compliance reports.

Constraints:

N/A.

Value range:

The value is an integer. The value length is 1 to 1,000,000.

Default value:

1.

limit

No

Integer

Definition:

Number of compliance reports queried on each page.

Constraints:

N/A.

Value range:

The value is an integer. The value length is 1 to 100.

Default value:

10.

sort_dir

No

String

Definition:

Sorting mode of the compliance report.

Constraints:

N/A.

Value range:

  • asc: ascending order

  • desc: descending order

Default value:

N/A.

sort_key

No

String

Definition:

Sorting field. You can select response fields for sorting, which works with the sort_dir parameter.

Constraints:

N/A.

Value range:

report_time (Report time)

Default value:

N/A.

report_scene

No

String

Definition:

Compliance report scenario.

Constraints:

N/A.

Value range:

  • CCE

  • ECS

  • BMS

Default value:

N/A.

cce_info_id

No

String

Definition:

CCE cluster ID.

Constraints:

N/A.

Value range:

The value is a string of 36 characters consisting of lowercase letters (a to z), digits (0 to 9), and hyphens (-). Example: aad16bee-1234-11ef-affb-1234ac1234b6.

Default value:

N/A.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

count

Long

Definition:

Total number of returned node compliance reports.

Constraints:

N/A.

Value range:

Integer.

Default value:

N/A.

instance_compliant

Array of InstanceCompliant objects

Definition:

Node compliance report.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

Table 3 InstanceCompliant

Parameter

Type

Description

compliant_summary

CompliantSummary object

Definition:

Compliance patch information.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

non_compliant_summary

NonCompliantSummary object

Definition:

Non-compliance patch information.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

execution_summary

ExecutionSummary object

Definition:

Execution information.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

id

String

Definition:

UUID of the compliance report.

Constraints:

If this parameter does not exist, create one inEnterprise Management.

Value range:

The value is a string of 36 characters consisting of lowercase letters (a to z), digits (0 to 9), and hyphens (-). Example: c17bbc73-f1b4-7890-91f3-a3aa1234561a.

Default value:

0.

enterprise_project_id

String

Definition:

Enterprise project ID.

Constraints:

If this parameter does not exist, create one inEnterprise Management.

Value range:

The value is a string of 36 characters consisting of lowercase letters (a to z), digits (0 to 9), and hyphens (-). Example: c17bbc73-f1b4-7890-91f3-a3aa1234561a.

Default value:

0.

name

String

Definition:

Resource name, which is the name of the ECS or BMS after patch scanning or patch fixing.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

instance_id

String

Definition:

Resource ID, which is the ID of the ECS or BMS after patch scanning or patch fixing.

Constraints:

N/A.

Value range:

The value is a string of 36 characters consisting of lowercase letters (a to z), digits (0 to 9), and hyphens (-). Example: 8c123456-e426-4cdd-b123-4e1e36e00f99.

Default value:

N/A.

node_id

String

Definition:

ID of the ECS in the CCE cluster.

Constraints:

N/A.

Value range:

The value is a string of 36 characters consisting of lowercase letters (a to z), digits (0 to 9), and hyphens (-). Example: aad16bee-1234-11ef-affb-1234ac1234b6.

Default value:

N/A.

ip

String

Definition:

Private IP address of the ECS or BMS NIC.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

eip

String

Definition:

EIP of the ECS or BMS.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

region

String

Definition:

ID of the region where the ECS or BMS instance is located. For details about the mapping between region names and IDs, seeRegions and Endpoints.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

group

String

Definition:

Name of the application group to which the ECS or BMS instance belongs. For details about the application information, seeOverview of Application Management.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

report_scene

String

Definition:

Compliance report scenario.

Constraints:

N/A.

Value range:

  • CCE

  • ECS

  • BMS

Default value:

N/A.

cce_info_id

String

Definition:

CCE cluster ID.

Constraints:

N/A.

Value range:

The value is a string of 36 characters consisting of lowercase letters (a to z), digits (0 to 9), and hyphens (-). Example: aad16bee-1234-11ef-affb-1234ac1234b6.

Default value:

N/A.

status

String

Definition:

Compliance status. If the compliance report contains non-compliant patches, the compliance status is non-compliant. Otherwise, the compliance status is compliant.

Constraints:

N/A.

Value range:

  • non_compliant

  • compliant

Default value:

N/A.

baseline_id

String

Definition:

Baseline ID.

Constraints:

N/A.

Value range:

The value is a string of 32 characters starting with JX- and consisting of lowercase letters (a to z) and digits (0 to 9), for example, JX-123456e9541f9b5775193ad3fb8a3.

Default value:

N/A.

baseline_name

String

Definition:

Baseline name.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

rule_type

String

Definition:

Baseline rules

Constraints:

N/A.

Value range:

  • standard

  • custom

Default value:

N/A.

operating_system

String

Definition:

Operating system of the ECS or BMS.

Constraints:

N/A.

Value range:

  • HuaweiCloudEulerOS

  • CentOS

  • EulerOS

Default value:

N/A.

Table 4 CompliantSummary

Parameter

Type

Description

compliant_count

Integer

Definition:

Number of returned compliant patches.

Constraints:

N/A.

Value range:

Integer.

Default value:

N/A.

severity_summary

SeveritySummary object

Definition:

Compliance summary.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

Table 5 NonCompliantSummary

Parameter

Type

Description

non_compliant_count

Integer

Definition:

Number of non-compliant patches.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

severity_summary

SeveritySummary object

Definition:

Compliance summary.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

Table 6 SeveritySummary

Parameter

Type

Description

critical_count

Integer

Definition:

Number of major compliance reports

Constraints:

N/A.

Value range:

Integer.

Default value:

N/A.

high_count

Integer

Definition:

Number of high compliance reports

Constraints:

N/A.

Value range:

Integer.

Default value:

N/A.

informational_count

Integer

Definition:

Number of informational compliance reports

Constraints:

N/A.

Value range:

Integer.

Default value:

N/A.

low_count

Integer

Definition:

Number of low compliance reports

Constraints:

N/A.

Value range:

Integer.

Default value:

N/A.

medium_count

Integer

Definition:

Number of medium compliance reports

Constraints:

N/A.

Value range:

Integer.

Default value:

N/A.

unspecified_count

Integer

Definition:

Number of unspecified compliance reports

Constraints:

N/A.

Value range:

Integer.

Default value:

N/A.

Table 7 ExecutionSummary

Parameter

Type

Description

order_id

String

Definition:

ID of the patch service ticket, which is generated when a patch scan or patch fixing service ticket is created.

Constraints:

N/A.

Value range:

The value must start with OST and be a string of 26 characters consisting of lowercase letters (a to z) and digits (0 to 9).

Default value:

N/A.

job_id

String

Definition:

ID of the script service ticket to be executed.

Constraints:

N/A.

Value range:

The value must start with SCT and be a string of 24 characters consisting of lowercase letters (a to z) and digits (0 to 9).

Default value:

N/A.

report_time

Long

Definition:

Report time.

Constraints:

N/A.

Value range:

13-bit millisecond UNIX timestamp.

Default value:

N/A.

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error description

Example Requests

Query the list of non-compliant reports in the ECS scenario report. Ten records are displayed on each page, starting from the first page.

GET https://coc.myhuaweicloud.com/v1/patch/instance/compliant?offset=1&limit=10&compliant_status=non_compliant&report_scene=ECS

Example Responses

Status code: 200

Node compliance report information is returned.

{
  "count" : 1,
  "instance_compliant" : [ {
    "baseline_id" : "JX-f2d85e2554f7385cbbf2c23a01f41",
    "baseline_name" : "COC-EulerOSDefaultPatchBaseline",
    "cce_info_id" : null,
    "compliant_summary" : {
      "compliant_count" : 264,
      "severity_summary" : {
        "critical_count" : 0,
        "high_count" : 0,
        "informational_count" : 0,
        "low_count" : 0,
        "medium_count" : 0,
        "unspecified_count" : 264
      }
    },
    "eip" : "123:123:12:1",
    "enterprise_project_id" : "c17bbc73-f1b4-7890-91f3-a3aa1234561a",
    "execution_summary" : {
      "job_id" : "string",
      "order_id" : "OST2025060116450602a8asdf1",
      "report_time" : 1715308575000
    },
    "group" : null,
    "id" : "string",
    "instance_id" : "8c123456-e426-4cdd-b123-4e1e36e00f99",
    "ip" : "192.168.2.1",
    "name" : "string",
    "node_id" : "",
    "non_compliant_summary" : {
      "non_compliant_count" : 204,
      "severity_summary" : {
        "critical_count" : 0,
        "high_count" : 0,
        "informational_count" : 0,
        "low_count" : 0,
        "medium_count" : 0,
        "unspecified_count" : 0
      }
    },
    "operating_system" : "EulerOS",
    "region" : "cn-north-4",
    "report_scene" : "ECS",
    "rule_type" : "standard",
    "status" : "non_compliant"
  } ]
}

Status code: 500

An error message is returned.

{
  "error_code" : "string",
  "error_msg" : "string"
}

Status Codes

Status Code

Description

200

Node compliance report information is returned.

500

An error message is returned.

Error Codes

See Error Codes.