Help Center/ CodeArts Check/ API Reference/ APIs/ Rule Management/ Querying Configuration Items by Rule Set ID List
Updated on 2026-02-03 GMT+08:00

Querying Configuration Items by Rule Set ID List

Function

This API is used to query the configuration information associated with a rule in a rule set. This API supports multiple rule set IDs.

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

POST /v1/config-items

Request Parameters

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

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

ids

Yes

Array of strings

Definition :

List of rule set IDs. Obtain the ID by calling the API used to obtain the rule set list.

Constraints:

N/A

Value range:

32-character string list.

Default value:

N/A

toolVersion

No

String

Definition:

Tool version.

Constraints:

N/A

Range:

N/A

Default value:

Latest version of the current environment.

arch

No

String

Definition:

Current environment type.

Constraints:

N/A

Value range:

  • x86: x86 environment.

  • ARM: Arm environment.

Default value:

X86

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

ConfigItemInfo object

Definition:

Compilation parameter list.

Range:

N/A

status

String

Definition:

API response status.

Value range:

  • success: successful response.

  • error: response failed.

Table 4 ConfigItemInfo

Parameter

Type

Description

key

String

Definition:

Key of a configuration parameter.

Range:

N/A

name

String

Definition:

Configuration parameter name.

Range:

N/A

defaulValue

String

Definition:

Default parameter value.

Range:

N/A

description

String

Definition:

Parameter description.

Range:

N/A

toolNames

String

Definition:

Name of the associated engine.

Range:

N/A

options

Array of strings

Definition:

Parameter options.

Range:

N/A

option

String

Definition:

Parameter options. Use commas (,) to separate multiple options.

Range:

N/A

setIds

String

Definition:

Rule set ID. Use commas (,) to separate multiple IDs.

Value range:

N/A

languages

String

Definition:

Language corresponding to the compilation parameter.

Range:

N/A

compileMap

Map<String,String>

Definition:

Map format.

  • key: name of the compilation tool.

  • value: compilation tool version or compilation command.

Value range:

N/A

descriptionMap

Map<String,String>

Definition:

Map format.

  • key: name of the compilation tool.

  • value: compilation command prompt.

Value 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

POST https://{endpoint}/v1/config-items

{
  "ids" : [ "24b97exxxxxxxxfb912625b14cxxxxxx", "24b97exxxxxxxxfb91cc25b14cxxxxxx" ],
  "toolVersion" : "202507",
  "arch" : "X86"
}

Example Responses

Status code: 200

Request Succeeded!

{
  "httpStatus" : "OK",
  "result" : [ {
    "configId" : "73dc3cb0bd3811ebad2ffa163efbc7ea",
    "defaulValue" : "jdk8",
    "description" : "The JDK version to be used for checks. The value can be **jdk8**, **jdk11**, or **jdk17**. The default value is **jdk8**.\n\n **For details, see https://his.huawei.com/doc/#/page.html?service_code=hrn:his:servicemarket::service:codecheck&group_id=c86dec7aec984218a65a9c7c4f24b572&lang=en_US**",
    "id" : "d2a19e9ef62649d3bc69a0faa162fdf0",
    "isRequired" : false,
    "isShowInIDE" : false,
    "key" : "jdkVersion",
    "name" : "[spotbugs] JDK version",
    "required" : false,
    "showInIDE" : false,
    "toolName" : "spotbugs",
    "toolNames" : "spotbugs",
    "type" : "0"
  } ],
  "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.