Help Center/ Cloud Operations Center/ API Reference/ API/ Patch management/ Obtaining Node Patch Details by Page
Updated on 2025-10-24 GMT+08:00

Obtaining Node Patch Details by Page

Function

This API is used to obtain the patch details of a node by page

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    coc:complianceReport:get

    Read

    -

    -

    -

    -

URI

GET /v1/patch/instance/compliant/{instance_compliant_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

instance_compliant_id

Yes

String

Definition:

Compliance report ID. After an ECS or BMS instance is scanned or patched, a compliance report row is generated on the patch scan page.

Constraints:

N/A.

Value range:

The value is a string of 32 characters consisting of lowercase letters (a to z) and digits (0 to 9), for example, 3f5f3c944f50da3a7038457c5ff76c66.

Default value:

N/A.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Definition:

Offset pointer for querying patch reports on each page.

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 patch 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.

title

No

String

Definition:

Patch name.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

sort_dir

No

String

Definition:

Sorting order of patch information.

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:

installed_time (patch installation time)

Default value:

N/A.

patch_status

No

String

Definition:

Patch status.

Constraints:

N/A.

Value range:

  • INSTALLED: installed

  • INSTALLED_OTHER: Non-baseline patch installed

  • MISSING: to be fixed

  • REJECT: rejected

  • FAILED: The repair fails.

  • PENDING_REBOOT: installed and to be rebooted

Default value:

N/A.

classification

No

String

Definition:

Category.

Constraints:

N/A.

Value range:

  • Security: patch for fixing security vulnerabilities

  • Bugfix: patch for fixing bugs

  • Enhancement: patch for function enhancement

  • Recommended: patch for recommended updates

  • Newpackage: patch for adding a software package

Default value:

N/A.

severity_level

No

String

Definition:

Severity level.

Constraints:

N/A.

Value range:

  • Critical

  • Important

  • Moderate

  • Low

  • None

Default value:

N/A.

compliance_level

No

String

Definition:

Compliance level.

Constraints:

N/A.

Value range:

  • UNSPECIFIED

  • CRITICAL

  • HIGH

  • MEDIUM

  • LOW

  • INFORMATIONAL

Default value:

N/A.

Request Parameters

None

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

count

Long

Definition:

Total number of returned patches.

Constraints:

N/A.

Value range:

Integer.

Default value:

N/A.

compliance_items

Array of ComplianceItem objects

Definition:

Patch compliance information.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

Table 4 ComplianceItem

Parameter

Type

Description

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.

title

String

Definition:

Patch name.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

classification

String

Definition:

Category.

Constraints:

N/A.

Value range:

  • Security: patch for fixing security vulnerabilities

  • Bugfix: patch for fixing bugs

  • Enhancement: patch for function enhancement

  • Recommended: patch for recommended updates

  • Newpackage: patch for adding a software package

Default value:

N/A.

severity_level

String

Definition:

Severity level.

Constraints:

N/A.

Value range:

  • Critical

  • Important

  • Moderate

  • Low

  • None

Default value:

N/A.

compliance_level

String

Definition:

Compliance level.

Constraints:

N/A.

Value range:

  • UNSPECIFIED

  • CRITICAL

  • HIGH

  • MEDIUM

  • LOW

  • INFORMATIONAL

Default value:

N/A.

patch_detail

PatchDetail object

Definition:

Patch details.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

Table 5 PatchDetail

Parameter

Type

Description

installed_time

Long

Definition:

Installation time.

Constraints:

N/A.

Value range:

13-bit millisecond UNIX timestamp.

Default value:

N/A.

patch_baseline_id

String

Definition:

Patch 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.

patch_baseline_name

String

Definition:

Patch baseline name.

Constraints:

N/A.

Value range:

N/A.

Default value:

N/A.

patch_status

String

Definition:

Patch status.

Constraints:

N/A.

Value range:

  • INSTALLED: installed

  • INSTALLED_OTHER: Non-baseline patch installed

  • MISSING: to be fixed

  • REJECT: rejected

  • FAILED: The repair fails.

  • PENDING_REBOOT: installed and to be rebooted

Default value:

N/A.

Status code: 500

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error description

Example Requests

Query the patch information in a specified report. Ten records are displayed on each page, starting from the first page.

GET https://coc.myhuaweicloud.com/v1/patch/instance/compliant/3f5f3c944f50da3a7038457c5ff76c66?offset=1&limit=10

Example Responses

Status code: 200

Node patch information is returned.

{
  "count" : 1,
  "compliance_items" : [ {
    "classification" : "",
    "compliance_level" : "UNSPECIFIED",
    "instance_id" : "string",
    "patch_detail" : {
      "installed_time" : 1713864585000,
      "patch_baseline_id" : "JX-f2d85e2554f7385cbbf2c23a01f41",
      "patch_baseline_name" : "COC-EulerOSDefaultPatchBaseline",
      "patch_status" : "PENDING_REBOOT"
    },
    "severity_level" : "",
    "title" : "string"
  } ]
}

Status code: 500

An error message is returned.

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

Status Codes

Status Code

Description

200

Node patch information is returned.

500

An error message is returned.

Error Codes

See Error Codes.