Rule Repository Management
A rule repository is the top-level container for review rules, used to organize and manage related review rules.Create Rule Repository
Create a review rule repository:workspace_id(required): Workspace IDname(required): Repository name, max length 30
List Rule Repositories
Get a list of all review rule repositories under the workspace, including rule groups and rules information:workspace_id(required): Workspace IDpage(optional): Page number, default is 1page_size(optional): Number of items per page, default is 10
Get Rule Repository
Get detailed information of a single review rule repository by repository ID:workspace_id(required): Workspace IDrepo_id(required): Review rule repository ID
Update Rule Repository
Update the name of a review rule repository:workspace_id(required): Workspace IDrepo_id(required): Rule repository IDname(required): New repository name, max length 30
Delete Rule Repository
Delete review rule repositories (batch deletion supported):workspace_id(required): Workspace IDrepo_ids(required): Array of rule repository IDs
Rule Group Management
A rule group is a secondary classification under a rule repository, used for more granular rule grouping and management.Create Rule Group
Create a rule group under a rule repository:workspace_id(required): Workspace IDrepo_id(required): Rule repository IDname(required): Rule group name, max length 30
Update Rule Group
Update the name of a rule group:workspace_id(required): Workspace IDgroup_id(required): Rule group IDname(required): New rule group name, max length 30
Delete Rule Group
Delete a rule group:workspace_id(required): Workspace IDgroup_id(required): Rule group ID
Rule Management
A rule is the smallest execution unit of review, defining specific review standards and logic.Create Rule
Create a review rule under a rule group:Get Category ID and Field ID
Before creating a rule, you need to get the category ID (category_id) and field ID (field_id). These IDs can be obtained through the following interfaces:
Get Category List
Get all categories under the workspace to obtain category IDs:categories[].id from the response as the category ID (category_id).
Get Category Fields List
Get all fields under a specified category to obtain field IDs:fields[].idis the regular field ID (field_id)tables[].idis the table ID (table_id)tables[].fields[].idis the table field ID (field_id)
workspace_id(required): Workspace IDrepo_id(required): Rule repository IDgroup_id(required): Rule group IDname(required): Rule nameprompt(required): Rule prompt, describing the review rule, used to guide AI in making review judgmentscategory_ids(optional): Array of applicable category IDs, which document categories the rule applies to. Obtained via the Get Category List interfacerisk_level(optional): Risk level, optional values:10(high risk),20(medium risk),30(low risk)referenced_fields(optional): Array of referenced fields, extraction fields that the rule needs to reference. Field IDs are obtained via the Get Category Fields List interface
Update Rule
Update a review rule:workspace_id(required): Workspace IDrule_id(required): Rule ID- Other parameters are the same as creating a rule, used to update rule properties
Delete Rule
Delete a review rule:workspace_id(required): Workspace IDrule_id(required): Rule ID
Complete Rule Creation Flow Example
Complete rule creation flow (including getting category ID and field ID):Python
Related Pages
- Review Concepts - Learn about core concepts of the review feature
- Create Review Tasks - Learn how to create review tasks
- Get Review Results - Learn how to get and use review results

