Querying Rule Set Information in Batches
Function
This API is used to query rule set information in batches. Multiple rule set IDs can be passed. The API response returns the rule set information corresponding to the queried 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::listRuleSets |
List |
- |
- |
- |
- |
URI
POST /v1/criterionsets/batch
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
No |
String |
Definition : 32-character project UUID. Obtain it by calling the API used to query the project list. Constraints: N/A Value range: 32 characters. Default value: N/A |
Request 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 |
|
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: Default value: X86 |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
httpStatus |
String |
Definition: HTTP response status. Value range: |
|
result |
Array of CriterionSetBody objects |
Definition: Rule set list. Range: N/A |
|
status |
String |
Definition: API response status. Value range: |
|
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: |
|
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: |
|
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: |
|
canDelete |
Boolean |
Definition: Whether the current user has the permission to delete the rule set. Value range: |
|
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: |
|
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: |
|
isProjectDefault |
String |
Definition: Whether the rule set is the default rule set of the project. Value range: |
|
isSystemSet |
String |
Definition: Whether the rule set is a system rule set. Value range: |
|
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: |
|
isUsed |
Boolean |
Definition: Whether the rule set is in use. Value range: |
|
isReliable |
Boolean |
Definition: Whether the rule set is trusted. This field has been deprecated. Value range: |
|
isRecommand |
String |
Definition: Whether the rule set is recommended. This field has been deprecated. Value range: |
|
isDefault |
Boolean |
Definition: Whether the rule set is the default rule set. This field has been deprecated. Value range: |
|
defaultSet |
String |
Definition: Whether the rule set is the default rule set. This field has been deprecated. Value range: |
|
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
|
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
|
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/criterionsets/batch
{
"ids" : [ "24b97exxxxxxxxfb912625b14cxxxxxx", "24b97exxxxxxxxfb91cc25b14cxxxxxx" ],
"toolVersion" : "202507",
"arch" : "X86"
}
Example Responses
Status code: 200
Request Succeeded!
{
"httpStatus" : "OK",
"result" : [ {
"canDelete" : false,
"canEdit" : false,
"comments" : "",
"createTime" : "2020-11-13 15:35:27.0",
"creator" : "SYSTEM",
"defaultSet" : "false",
"detecteObjType" : "biz_code",
"folder" : "3 layer operations rule set/",
"id" : "ba663cc24c904fe28151ab61a55dc754",
"inheritMode" : "strong",
"isProjectDefault" : "0",
"isRecommand" : "0",
"isReliable" : true,
"isSystemDefault" : "0",
"isSystemSet" : "0",
"language" : "C++",
"lastReviser" : "SYSTEM",
"lastUpdateTime" : "2020-11-13 15:35:27.0",
"name" : "Default CPP rule set",
"numCriterion" : 2251,
"parentFolderId" : "24519a31060141708a0c61c1ac75e672",
"parentId" : "1f9d5c4485844b19827610412c130b61",
"parentSetNames" : "",
"recommandType" : "0",
"reliableTag" : "",
"type" : "system"
} ],
"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.
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