Querying Patch Compliance Reports
Function
This API is used to obtain node compliance reports by page.
URI
GET /v1/patch/instance/compliant
| 
        Parameter  | 
      
        Mandatory or Not  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|---|
| 
        enterprise_project_id  | 
      
        No  | 
      
        String  | 
      
        Enterprise project ID  | 
     
| 
        name  | 
      
        No  | 
      
        String  | 
      
        Name  | 
     
| 
        instance_id  | 
      
        No  | 
      
        String  | 
      
        ECS instance ID  | 
     
| 
        ip  | 
      
        No  | 
      
        String  | 
      
        Internal network IP address  | 
     
| 
        eip  | 
      
        No  | 
      
        String  | 
      
        Elastic IP address  | 
     
| 
        operating_system  | 
      
        No  | 
      
        String  | 
      
        OS 
  | 
     
| 
        region  | 
      
        No  | 
      
        String  | 
      
        Region  | 
     
| 
        group  | 
      
        No  | 
      
        String  | 
      
        Group  | 
     
| 
        compliant_status  | 
      
        No  | 
      
        String  | 
      
        Compliance status 
  | 
     
| 
        order_id  | 
      
        No  | 
      
        String  | 
      
        Service ticket ID  | 
     
| 
        offset  | 
      
        No  | 
      
        Integer  | 
      
        Offset Minimum value: 1 Maximum value: 1000000 Default value: 1  | 
     
| 
        limit  | 
      
        No  | 
      
        Integer  | 
      
        Number of records on each page Minimum value: 1 Maximum value: 100 Default value: 10  | 
     
| 
        sort_dir  | 
      
        No  | 
      
        String  | 
      
        Sorting order 
  | 
     
| 
        sort_key  | 
      
        No  | 
      
        String  | 
      
        Sorting field 
  | 
     
| 
        report_scene  | 
      
        No  | 
      
        String  | 
      
        Report scenario. The options are listed as follows: 
  | 
     
| 
        cce_info_id  | 
      
        No  | 
      
        String  | 
      
        CCE cluster information ID  | 
     
Request Parameters
None
Response Parameters
Status code: 200
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        count  | 
      
        Long  | 
      
        Total number of records  | 
     
| 
        instance_compliant  | 
      
        Array of InstanceCompliant objects  | 
      
        Node compliance report Array length: 0 to 1,000 elements  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        compliant_summary  | 
      
        CompliantSummary object  | 
      
        Compliance patch information  | 
     
| 
        non_compliant_summary  | 
      
        NonCompliantSummary object  | 
      
        Non-compliant patch information  | 
     
| 
        execution_summary  | 
      
        ExecutionSummary object  | 
      
        Execution information  | 
     
| 
        id  | 
      
        String  | 
      
        id  | 
     
| 
        enterprise_project_id  | 
      
        String  | 
      
        Enterprise project ID  | 
     
| 
        name  | 
      
        String  | 
      
        Node name  | 
     
| 
        instance_id  | 
      
        String  | 
      
        Node ID  | 
     
| 
        node_id  | 
      
        String  | 
      
        CCE cluster node ID  | 
     
| 
        ip  | 
      
        String  | 
      
        Node IP address  | 
     
| 
        eip  | 
      
        String  | 
      
        Elastic IP address  | 
     
| 
        region  | 
      
        String  | 
      
        Region  | 
     
| 
        group  | 
      
        String  | 
      
        Group  | 
     
| 
        report_scene  | 
      
        String  | 
      
        Reporting scenario (CCE and ECS)  | 
     
| 
        cce_info_id  | 
      
        String  | 
      
        CCE cluster information ID  | 
     
| 
        status  | 
      
        String  | 
      
        Compliance status  | 
     
| 
        baseline_id  | 
      
        String  | 
      
        Baseline ID  | 
     
| 
        baseline_name  | 
      
        String  | 
      
        Baseline name  | 
     
| 
        rule_type  | 
      
        String  | 
      
        Baseline rule type  | 
     
| 
        operating_system  | 
      
        String  | 
      
        OS  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        compliant_count  | 
      
        Integer  | 
      
        Number of compliant patches  | 
     
| 
        severity_summary  | 
      
        SeveritySummary object  | 
      
        Compliance summary  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        non_compliant_count  | 
      
        Integer  | 
      
        Number of non-compliant patches  | 
     
| 
        severity_summary  | 
      
        SeveritySummary object  | 
      
        Compliance summary  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        critical_count  | 
      
        Integer  | 
      
        Number of major compliance reports  | 
     
| 
        high_count  | 
      
        Integer  | 
      
        Number of high compliance reports  | 
     
| 
        informational_count  | 
      
        Integer  | 
      
        Number of informational compliance reports  | 
     
| 
        low_count  | 
      
        Integer  | 
      
        Number of low compliance reports  | 
     
| 
        medium_count  | 
      
        Integer  | 
      
        Number of medium compliance reports  | 
     
| 
        unspecified_count  | 
      
        Integer  | 
      
        Number of unspecified compliance reports  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        order_id  | 
      
        String  | 
      
        Service ticket ID  | 
     
| 
        job_id  | 
      
        String  | 
      
        Script execution ID  | 
     
| 
        report_time  | 
      
        Long  | 
      
        Reporting time  | 
     
Status code: 500
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        error_code  | 
      
        String  | 
      
        Error Code Minimum length: 8 characters Maximum length: 64 characters  | 
     
| 
        error_msg  | 
      
        String  | 
      
        Error description Minimum length: 2 characters Maximum length: 512 characters  | 
     
Request Example
Querying the list of non-compliant ECS reports
/v1/patch/instance/compliant?offset=1&limit=10&compliant_status=non_compliant&report_scene=ECS
Response Example
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" : null,
    "enterprise_project_id" : "string",
    "execution_summary" : {
      "job_id" : "string",
      "order_id" : "string",
      "report_time" : 1715308575000
    },
    "group" : null,
    "id" : "string",
    "instance_id" : "string",
    "ip" : "string",
    "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" : "string",
    "report_scene" : "ECS",
    "rule_type" : "standard",
    "status" : "non_compliant"
  } ]
}
  Status code: 500
An error message is returned.
{
  "error_code" : "string",
  "error_msg" : "string"
}
 Status Code
| 
        Status Code  | 
      
        Description  | 
     
|---|---|
| 
        200  | 
      
        Node compliance report information is returned.  | 
     
| 
        500  | 
      
        An error message is returned.  | 
     
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.