Querying Rule Sets - Version 2
Function
This API is used to query the rule set list and return the rule set details. You can filter the result by language and rule set name.
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
GET /v2/all-criterionsets
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
languages |
No |
String |
Definition: Rule languages. Use commas (,) to separate multiple languages. Constraints: N/A Value range: Default value: N/A |
|
search |
No |
String |
Definition: Search keyword. Constraints: N/A Value range: N/A Default value: N/A |
|
page_size |
No |
Integer |
Definition: Number of rule sets on each page. Constraints: N/A Value range: 1–50 Default value: 10 |
|
page |
No |
Integer |
Definition: Total number of pages. Constraints: N/A Value range: 0–999 Default value: 1 |
|
my_create |
No |
String |
Definition: Whether to query the rule sets created by me. Constraints: N/A Value range: Default value: false |
|
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: 1 to 128 characters, including letters and digits. Default value: N/A |
|
is_call_status |
No |
String |
Definition: Whether to query the usage status. Constraints: N/A Value range: Default value: true. |
|
sort_field |
No |
String |
Definition: Sorting parameter. Constraints: N/A Value range: Default value: N/A |
|
sort_order |
No |
String |
Definition: Sorting parameter. Constraints: N/A Value range: Default value: up. |
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 |
|
operator |
No |
String |
Definition: Operator username. Constraints: N/A Value range: 1 to 128 characters. Default value: N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
httpStatus |
String |
Definition: HTTP response status. Value range: |
|
result |
CriterionSetsInfo object |
Definition: Rule list. Range: N/A |
|
status |
String |
Definition: API response status. Value range: |
|
Parameter |
Type |
Description |
|---|---|---|
|
criterionSetList |
Array of CriterionSetListV2Body objects |
Definition: Rule list. Range: N/A |
|
total |
Integer |
Definition: Total number of rules. Value range: ≥0 |
|
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: |
|
ruleIds |
String |
Definition: Unique ID of an enabled capability rule in the rule set. Value range: 32-character UUID. Use commas (,) to separate multiple IDs. |
|
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: |
|
childSets |
Array of strings |
Definition: Sub-rule set. Range: N/A |
|
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
GET https://{endpoint}/v2/all-criterionsets?project_id=8c7c74775f4f496596e4a39d34b209c3&languages=JAVA&page=1&page_size=10&is_call_status=false
Example Responses
Status code: 200
query criterionsets
{
"httpStatus" : "OK",
"result" : {
"criterionSetList" : [ {
"businessId" : "",
"businessName" : "",
"canDelete" : true,
"canEdit" : true,
"childSets" : [ ],
"comments" : "",
"createTime" : "2020-11-13 15:35:06.0",
"creator" : "SYSTEM",
"creatorId" : "",
"deptId" : "",
"deptName" : "",
"detecteObjType" : "biz_code",
"id" : "24519a31060141708a0c61c1ac75e672",
"isProjectDefault" : "0",
"isRecommand" : "0",
"isReliable" : true,
"isSystemDefault" : "0",
"isSystemSet" : "0",
"lastReviser" : "SYSTEM",
"lastUpdateTime" : "2020-11-13 15:35:06",
"managers" : "",
"name" : "3 layer operations rule set",
"numCriterion" : 0,
"order" : 1,
"parentFolderId" : "",
"parentSetNames" : "",
"recommandType" : "0",
"reliableTag" : "",
"type" : "dir"
} ],
"total" : 1
},
"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 |
query criterionsets |
|
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