Updated on 2026-02-03 GMT+08:00

Querying Rule Filters

Function

This API is used to query the number of rules corresponding to each tag after the rules are filtered by criteria.

Calling Method

For details, see Calling APIs.

Authorization Information

Each account root user has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

codeartscheck::listRules

List

-

-

-

-

URI

GET /v1/criterion-filters

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

system_tag

No

String

Definition:

Engine name.

Constraints:

N/A

Range:

sonarqube, wordstool, clangtidy, codemars, secbrella, cppcheck, apiengine, eslint, fixbotengine-java, fixbotengine-cxx, oat, pylint, SQLGuardian, cmetrics, codecheckrevive, clippy, detektout, cjlint, flake8, LuaGuardian, thirdpartycheck, FossScan, Infer_Java, and testengine.

Default value:

N/A

severitys

No

String

Definition:

Issue severity.

Constraints:

N/A

Value range:

  • 0: critical

  • 1: major

  • 2: minor

  • 3: suggestion

Default value:

0,1,2,3. By default, issues of all severity levels are queried.

languages

No

String

Definition:

Rule languages. Use commas (,) to separate multiple languages.

Constraints:

N/A

Value range:

  • ArkTS

  • C#

  • Cangjie

  • C++

  • CSS

  • Go

  • HTML

  • Java

  • JavaScript

  • Kotlin

  • Lua

  • PHP

  • Python

  • Rust

  • Scala

  • Shell

  • SQL

  • Terraform

  • TypeScript

Default value:

N/A

search

No

String

Definition:

Keyword for search.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

set_id

No

String

Definition :

Rule set ID. Obtain the ID by calling the API used to obtain the rule set list.

Constraints:

N/A

Value range:

1 to 32 characters.

Default value:

N/A

status

No

String

Definition:

Whether the rules in a rule set are enabled.

Constraints:

N/A

Value range:

  • enable: enabled.

  • disable: disabled.

Default value:

enable.

inherit

No

String

Definition:

Inheritance type.

Constraints:

N/A

Value range:

  • true: inherited rule.

  • false: non-inherited rule.

  • rewrite: edited rule.

Default value:

The default value is null, indicating that all inherited rules are queried.

onlines

No

String

Definition:

Online status.

Constraints:

N/A

Value range:

  • 0: offline.

  • 1: online.

Default value:

1

show_tool_version

No

String

Definition:

Display version.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

tool_version

No

String

Definition:

Tool version.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

cwe_search

No

String

Definition:

CWE search.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

compile

No

String

Definition:

Compilation rule or not.

Constraints:

N/A

Value range:

  • compile: compilation rule.

  • noCompile: non-compilation rule.

Default value:

N/A

security

No

String

Definition:

Security and quality classification.

Constraints:

N/A

Value range:

  • security: security check.

  • security_enhance: enhanced security check.

  • quality: quality check.

Default value:

N/A

industry_standards

No

String

Definition:

Industry standards.

Constraints:

N/A

Value range:

N/A

Default value:

N/A

source_type

No

String

Definition:

Rule creation type.

Constraints:

N/A

Value range:

  • 0: custom rule.

  • 1: system rule.

Default value:

N/A

project_id

No

String

Definition :

You can obtain the 32-character UUID by calling the API used to query the project list.

Constraints:

N/A

Value range:

32-character project ID.

Default value:

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition :

User token. Obtain one by calling the IAM API Obtaining a User Token. The value of X-Subject-Token in the response header is a token.

Constraints:

N/A

Value range:

1–100,000 characters.

Default value:

N/A

operator

Yes

String

Definition:

Operator username.

Constraints:

N/A

Value range:

1 to 128 characters.

Default value:

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

httpStatus

String

Definition:

HTTP response status.

Value range:

  • OK: The request has been successfully processed, and the server returns the requested resource or operation result.

  • ACCEPTED: The request has been accepted by the server, but the processing is not complete (usually used for asynchronous operations).

  • INTERNAL_SERVER_ERROR: internal API exception.

  • BAD_REQUEST: abnormal parameter verification.

result

CriterionFilterInfo object

Definition:

Rule filter.

Range:

N/A

status

String

Definition:

API response status.

Value range:

  • success: successful response.

  • error: response failed.

Table 4 CriterionFilterInfo

Parameter

Type

Description

languageInfoList

Array of FilterUnit objects

Definition:

Language filter list.

Range:

N/A

severityInfoList

Array of FilterUnit objects

Definition:

List of alarm severity filters.

Range:

N/A

Table 5 FilterUnit

Parameter

Type

Description

filterKey

String

Definition:

Filter metric name.

Value range:

  • language: language.

  • severity: alarm severity.

  • status: whether the rule is enabled.

  • system_tag: check engine.

  • compile: whether the rule is a compilation rule.

  • security: security and quality.

  • industryStandards: industry standards.

  • onlines: online/offline status.

  • sourceType: whether this rule is a system rule.

  • inherit: inheritance status.

filterValue

Integer

Definition:

Value of the filter metric.

Range:

N/A

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error code.

Value range:

N/A

error_msg

String

Definition:

Error message.

Value range:

N/A

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Definition:

Error code.

Value range:

N/A

error_msg

String

Definition:

Error message.

Value range:

N/A

Example Requests

Query filter.

GET https://{endpoint}/v1/criterion-filters?system_tag=secbrella&languages=JAVA&tool_version=202507&onlines=1

Example Responses

Status code: 200

query filters and counts by filter

{
  "httpStatus" : "OK",
  "result" : {
    "languageInfoList" : [ {
      "filterKey" : "java",
      "filterValue" : 4709
    } ],
    "severityInfoList" : [ {
      "filterKey" : "1",
      "filterValue" : 209
    } ]
  },
  "status" : "success"
}

Status code: 400

Bad Request

{
  "error_code" : "CC.xxxxxxxx.400",
  "error_msg" : "Verify request parameter failed. Check whether the request parameters are correct."
}

Status code: 401

Unauthorized

{
  "error_code" : "CC.00000003",
  "error_msg" : "Authentication information expired."
}

Status Codes

Status Code

Description

200

query filters and counts by filter

400

Bad Request

401

Unauthorized

Error Codes

See Error Codes.