Help Center/ CodeArts Check/ API Reference/ APIs/ Rule Management/ Querying Rule Set Information
Updated on 2026-02-03 GMT+08:00

Querying Rule Set Information

Function

This API is used to query the rule set information by the rule set ID.

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::getRuleSet

Read

-

-

-

-

URI

GET /v1/criterionsets/{set_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

set_id

Yes

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

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

No

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

CriterionSetBody object

Definition:

Rule set information.

Range:

N/A

status

String

Definition:

API response status.

Value range:

  • success: successful response.

  • error: response failed.

Table 4 CriterionSetBody

Parameter

Type

Description

id

String

Definition:

Rule set ID.

Value range:

N/A

name

String

Definition:

Rule set name in Chinese.

Range:

N/A

comments

String

Definition:

Rule set description in Chinese.

Range:

N/A

type

String

Definition:

Rule set type.

Value range:

  • system: system rule set.

  • custom: custom rule set.

creator

String

Definition:

Rule set creator.

Range:

Username.

createTime

String

Definition:

Time when a rule set is created.

Range:

Coordinated universal time.

lastReviser

String

Definition:

Latest operator of a rule set.

Range:

Username.

lastUpdateTime

String

Definition:

Time when the rule set was last updated.

Range:

Coordinated universal time.

language

String

Definition:

Rule set language.

Value range:

  • ArkTS

  • C#

  • Cangjie

  • C++

  • CSS

  • Go

  • HTML

  • Java

  • JavaScript

  • Kotlin

  • Lua

  • PHP

  • Python

  • Rust

  • Scala

  • Shell

  • SQL

  • Terraform

  • TypeScript

parentId

String

Definition:

Parent rule set ID.

Value range:

32-character UUID string. Use commas (,) to separate multiple IDs.

numCriterion

Integer

Definition:

Number of enabled rules in a rule set.

Value range:

≥0

canEdit

Boolean

Definition:

Whether the current user has the permission to edit the rule set.

Value range:

  • true: The edit permission is granted.

  • false: The edit permission is not granted.

canDelete

Boolean

Definition:

Whether the current user has the permission to delete the rule set.

Value range:

  • true: The delete permission is granted.

  • false: The delete permission is not granted.

managers

String

Definition:

Rule set administrator.

Value range:

User ID. Use commas (,) to separate multiple IDs.

parentSetNames

String

Definition:

Name of a parent rule set.

Range:

Use commas (,) to separate multiple rule set names.

domainId

String

Definition:

Tenant ID.

Value range:

32-character UUID.

inheritMode

String

Definition:

Inheritance type.

Value range:

  • strong: inherited.

  • null: non-inherited.

creatorId

String

Definition:

Creator ID.

Value range:

32-character UUID.

isSystemDefault

String

Definition:

Whether the rule set is the default rule set of the system.

Value range:

  • 0: no.

  • 1: yes.

isProjectDefault

String

Definition:

Whether the rule set is the default rule set of the project.

Value range:

  • 0: no.

  • 1: yes.

isSystemSet

String

Definition:

Whether the rule set is a system rule set.

Value range:

  • 0: no.

  • 1: yes.

region

String

Definition:

Region where the rule set is located.

Range:

N/A

canSetDefault

Boolean

Definition:

Whether the user has the permission to set the default rule set.

Value range:

  • true: The user has the permission.

  • false: The user does not have the permission.

isUsed

Boolean

Definition:

Whether the rule set is in use.

Value range:

  • true: yes.

  • false: no.

isReliable

Boolean

Definition:

Whether the rule set is trusted. This field has been deprecated.

Value range:

  • true: yes.

  • false: no.

isRecommand

String

Definition:

Whether the rule set is recommended. This field has been deprecated.

Value range:

  • 1: yes.

  • 0: no.

isDefault

Boolean

Definition:

Whether the rule set is the default rule set. This field has been deprecated.

Value range:

  • true: yes.

  • false: no.

defaultSet

String

Definition:

Whether the rule set is the default rule set. This field has been deprecated.

Value range:

  • true: yes.

  • false: no.

deptId

String

Definition:

This field has been discarded.

Range:

N/A

deptName

String

Definition:

This field has been discarded.

Range:

N/A

reliableTag

String

Definition:

This field has been discarded.

Range:

N/A

recommandType

String

Definition:

This field has been discarded.

Range:

N/A

Status code: 400

Table 5 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 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

Example Requests

GET https://{endpoint}/v1/criterionsets/24b97exxxxxxxxfb91cc25b14cxxxxxx

Example Responses

Status code: 200

Request Succeeded!

{
  "httpStatus" : "OK",
  "result" : {
    "businessId" : "23900138",
    "businessName" : "Cloud & AI common",
    "canDelete" : true,
    "canEdit" : true,
    "comments" : "Let's talk about it.",
    "createTime" : "2020-11-13 15:35:06.0",
    "creator" : "SYSTEM",
    "defaultSet" : "false",
    "deptId" : "Company",
    "deptName" : "Company",
    "detecteObjType" : "biz_code",
    "id" : "fd146b4f384d442191fe49200bfce00f",
    "isProjectDefault" : "0",
    "isRecommand" : "0",
    "isReliable" : true,
    "isSystemDefault" : "0",
    "isSystemSet" : "0",
    "language" : "C",
    "lastReviser" : "",
    "lastUpdateTime" : "2024-03-06 17:05:41",
    "managers" : "",
    "name" : "Minimum set of Huawei C rules (programming specifications)",
    "numCriterion" : 51,
    "parentFolderId" : "24519a31060141708a0c61c1ac75e672",
    "parentFolderName" : "3 layer operations rule set",
    "parentId" : "",
    "parentSetNames" : "",
    "recommandType" : "2",
    "reliableTag" : "",
    "remark" : "ass",
    "type" : "tool"
  },
  "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

Request Succeeded!

400

Bad Request

401

Unauthorized

Error Codes

See Error Codes.