INC-iCC

Query Compliance Policy Information List

Query the compliance policy information list based on the specified conditions.

Interface URI

/icc/compliancePolicy

Access Method

HTTP
GET
Parameters
Query parameters
name Compliance policy name.
String type. Supports wildcards. Optional. No default value.
description Compliance policy description.
String type. Supports wildcards. Optional. No default value.
active Whether the compliance policy is enabled.
Integer type. 0: Enabled; 1: Disabled. Optional. No default value.
type Type.
Integer type. 0: System-defined; 1: User-defined. Optional. No default value.
creator Creator.
String type. Supports wildcards. Optional. No default value.
version Compliant version.
String type. Supports wildcards. Optional. No default value.
componentName Component name.
String type. Supports wildcards. Optional. No default value.
detail Whether to query details.
Boolean type. Optional. The default is false.
start Position of the first returned item in the total result set.
Integer type. Optional. The default is 0. If the input value is smaller than 0, it is automatically adjusted to 0.
size Total number of returned items.
Integer type. Optional. The default is 10. If the input value is smaller than 0, it is automatically adjusted to 0. If the input value is greater than 1000, it is automatically adjusted to 1000.
orderBy Sorting field of the returned items.
String type. Optional. The default is id. Options are id and name.
desc Whether to sort the items in descending order.
Boolean type. Optional. The default is false. This parameter takes effect only when the orderBy parameter is specified.
total Returns only the number of matching items.
Boolean type. Optional. The default is false. If the value is true, the start and size parameters are invalid, an empty message body is returned, and the Total attribute in the message header returns the number of matching items.
accurate Whether to accurately match the query keywords.
Boolean type. Optional. The default is false.

Return Values

Status codes
  • 200 (OK): Success.
Message header

When the total parameter is true , the Total attribute returns the number of matching items. In this case, no message body is returned.
HTTP/1.1 200 OK
Total: 20
Message body
<list>
  <compliancePolicy>
    <id>1</id>
    <name>Security check group</name>
    <description>Check whether the device access is secure. </description>
    <active>1</active>
    <type>0</type>
    <creator>$System</creator>
    <createTime>-28800000</createTime>
    <version></version>
    <componentName></componentName>
  </compliancePolicy>
  <compliancePolicy>
    <id>2</id>
    <name>Service check group</name>
    <description>Check the device service configuration. </description>
    <active>1</active>
    <type>0</type>
    <creator>$System</creator>
    <createTime>-28800000</createTime>
    <version></version>
    <componentName></componentName>
  </compliancePolicy>
  <link op="GET" rel="previous" href="http://localhost:8080/imcrs/icc/compliancePolicy?start=0&size=2&total=false&detail=false&desc=false&accurate=false&orderBy=id"/>
  <link op="GET" rel="next" href="http://localhost:8080/imcrs/icc/compliancePolicy?start=3&size=2&total=false&detail=false&desc=false&accurate=false&orderBy=id"/>
</list>

For more information about fields in the message body, see Query Compliance Policy Information.

Example

Query the compliance policy information list based on the specified conditions.

Request
GET http://localhost:8080/imcrs/icc/compliancePolicy?detail=false&start=1&size=2&orderBy=id&desc=false&total=false&accurate=false
accept: application/xml
...
        
Response
HTTP/1.1 200 OK
Content-Type: application/xml
...

<list>
  <compliancePolicy>
    <id>1</id>
    <name>Security check group</name>
    <description>Check whether the device access is secure. </description>
    <active>1</active>
    <type>0</type>
    <creator>$System</creator>
    <createTime>-28800000</createTime>
    <version></version>
    <componentName></componentName>
  </compliancePolicy>
  <compliancePolicy>
    <id>2</id>
    <name>Service check group</name>
    <description>Check the device service configuration. </description>
    <active>1</active>
    <type>0</type>
    <creator>$System</creator>
    <createTime>-28800000</createTime>
    <version></version>
    <componentName></componentName>
  </compliancePolicy>
  <link op="GET" rel="previous" href="http://localhost:8080/imcrs/icc/compliancePolicy?start=0&size=2&total=false&detail=false&desc=false&accurate=false&orderBy=id"/>
  <link op="GET" rel="next" href="http://localhost:8080/imcrs/icc/compliancePolicy?start=3&size=2&total=false&detail=false&desc=false&accurate=false&orderBy=id"/>
</list>