Querying the Check Parameters of a Rule Set (Version 2)
Function
This API is used to query the check parameters of a rule set (version 2).
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/tasks/{task_id}/ruleset/{ruleset_id}/check-parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
task_id |
Yes |
String |
Task ID. |
ruleset_id |
Yes |
String |
Rule set ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
language |
Yes |
String |
Rule set language. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
No |
String |
Media type and encoding format. |
X-Auth-Token |
Yes |
String |
User token. It 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
Parameter |
Type |
Description |
---|---|---|
[items] |
Array<Array<TaskCheckParamters>> |
Request succeeded! |
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. |
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
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
GET https://{endpoint}/v2/{project_id}/tasks/{task_id}/ruleset/{ruleset_id}/check-parameters
Example Responses
Status code: 200
Request succeeded!
[ { "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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot