Help Center/ CodeArts Check/ API Reference/ APIs/ Rule Management/ Querying Default Rule Sets of a Project
Updated on 2026-02-03 GMT+08:00

Querying Default Rule Sets of a Project

Function

This API is used to query the default rule set of each language in a project. Default rule set ID of each language is returned.

Calling Method

For details, see Calling APIs.

Authorization Information

No identity policy-based permission required for calling this API.

URI

GET /v1/criterionset/get-default-sets

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

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 UUID.

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

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

Map<String,String>

Definition:

Default rule set ID of each language in the project. The structure is map.

Value range:

  • key: language.

  • value: rule set ID.

status

String

Definition:

API response status.

Value range:

  • success: successful response.

  • error: response failed.

Status code: 400

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

Example Requests

GET https://{endpoint}/v1/criterionset/get-default-sets?project_id=8c7c74775f4f496596e4a39d34b209c3

Example Responses

Status code: 200

get default sets

{
  "httpStatus" : "OK",
  "status" : "success",
  "result" : {
    "arkts" : "e283302be51111ee9439909838cbb4b5",
    "c#" : "b113b9bee57545738bee86ec69f337a6",
    "c++" : "a9ac0292e14c44e39d6a93395cdf2629",
    "css" : "8b17c76da51145bdb16ad58a5b55fad9",
    "go" : "c5168e30ace948a78e3d42e5bfd2b592",
    "html" : "4e988c481b4c46d0a3297fbe343a662d",
    "java" : "782aade71ffb4ab780303555eb2e4825",
    "javascript" : "cce1c1bce5ae4764b5b3f0b768cca6ca",
    "kotlin" : "78cbb4418fed4460834b6753d32605e7",
    "lua" : "8c21a21bc3d74d2386fa62ed119d0ce0",
    "php" : "6ddae60e22d74ca4bdfcd91f4b1db87e",
    "python" : "d2c81699269b420483e797e06e9bbf21",
    "rust" : "a39df150e7e244719d00088e310d001f",
    "scala" : "632b8ea9c0f24a81acdb226b2bbdffc7",
    "shell" : "71e966afdb934babbb7615a4ac68f5af",
    "sql" : "dae19546ebdb11ee9439909838cbb4b5",
    "typescript" : "5986aecac5db453f96e1546d76bf1681"
  }
}

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

get default sets

400

Bad Request

401

Unauthorized

Error Codes

See Error Codes.