Help Center/ CodeArts Check/ API Reference/ APIs/ Task Management/ Querying the Check Parameters of a Rule Set (Version 3)
Updated on 2024-11-28 GMT+08:00

Querying the Check Parameters of a Rule Set (Version 3)

Function

This API is used to query the check parameters of a rule set (version 3).

Calling Method

For details, see Calling APIs.

URI

GET /v3/{project_id}/tasks/{task_id}/ruleset/{ruleset_id}/check-parameters

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

task_id

Yes

String

Task ID.

ruleset_id

Yes

String

Rule set ID.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

language

Yes

String

Rule set language.

offset

No

Integer

(Optional) Offset for pagination.

limit

No

Integer

(Optional) Number of items displayed on each page.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

No

String

Media type and encoding format.

X-Auth-Token

Yes

String

User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

data

Array of TaskCheckParamters objects

Data history.

total

Integer

Total number.

Table 5 TaskCheckParamters

Parameter

Type

Description

check_id

Integer

ID of check tool.

name

String

Compilation parameter name.

checker_configs

Array of CheckConfigInfo objects

Configuration of the check parameter.

Table 6 CheckConfigInfo

Parameter

Type

Description

name

String

Name of the check parameter.

cfg_key

String

Key value corresponding to the check parameter.

default_value

String

Default value of the check parameter.

option_value

String

Option for the check parameter.

is_required

Integer

0: optional; 1: mandatory.

description

String

Description for the check parameter.

type

Integer

Parameter type. 0: text; 2: optional.

status

String

Parameter status. on: enabled; off: disabled.

value

String

Check parameter value.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 401

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Requests

GET https://{endpoint}/v3/{project_id}/tasks/{task_id}/ruleset/{ruleset_id}/check-parameters

Example Responses

Status code: 200

Request succeeded!

{
  "total" : 1,
  "data" : [ {
    "check_id" : 0,
    "name" : "compile_tool",
    "check_configs" : [ {
      "value" : "",
      "name" : "Compile command",
      "cfg_key" : "",
      "default_value" : "",
      "option_value" : "",
      "is_required" : 0,
      "description" : "Compile command.",
      "type" : 0,
      "status" : "on"
    } ]
  } ]
}

Status code: 400

Bad Request

{
  "error_code" : "CC.00000000",
  "error_msg" : "Network busy. Try again later."
}

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.