> ## Documentation Index
> Fetch the complete documentation index at: https://docs-docflow.textin.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取审核规则库

> 获取审核规则库



## OpenAPI

````yaml /docflow/cn/rest-api/openapi.bundle.yaml get /api/app-api/sip/platform/v2/review/rule_repo/get
openapi: 3.0.0
info:
  title: DocFlow API
  description: DocFlow REST API，提供文件上传和获取文件处理结果能力
  version: 2.8.4
servers:
  - url: https://docflow.textin.com
security:
  - ApiId: []
    SecretCode: []
paths:
  /api/app-api/sip/platform/v2/review/rule_repo/get:
    get:
      tags:
        - 智能审核
      summary: 获取审核规则库
      description: 获取审核规则库
      operationId: getReviewRuleRepo
      parameters:
        - name: workspace_id
          in: query
          description: 空间ID
          required: true
          schema:
            type: string
            example: '1234567890'
        - name: repo_id
          in: query
          description: 审核规则库ID
          required: true
          schema:
            type: string
            example: '31415926'
      responses:
        '200':
          description: 成功获取审核规则库
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CodeMessage'
                  - type: object
                    properties:
                      result:
                        $ref: '#/components/schemas/ReviewRuleRepo'
components:
  schemas:
    CodeMessage:
      type: object
      properties:
        code:
          type: integer
          description: 状态码
          example: 200
        msg:
          type: string
          description: 状态描述
      required:
        - code
        - msg
    ReviewRuleRepo:
      type: object
      properties:
        repo_id:
          type: string
          description: 审核规则库ID
          example: '31415926'
        name:
          type: string
          description: 审核规则库名称
          example: 审核规则库1
        groups:
          description: 规则库下的规则组列表
          type: array
          items:
            $ref: '#/components/schemas/ReviewRuleGroup'
        category_ids:
          type: array
          items:
            type: string
            description: 分类ID
            example: '1234567890'
    ReviewRuleGroup:
      type: object
      properties:
        group_id:
          type: string
          description: 规则组ID
          example: '31415926'
        name:
          type: string
          description: 规则组名称
          example: 审核规则组1
        rules:
          type: array
          items:
            $ref: '#/components/schemas/ReviewRule'
    ReviewRule:
      type: object
      properties:
        rule_id:
          type: string
          description: 规则ID
          example: '31415926'
        name:
          type: string
          description: 规则名称
          example: 审核规则1
        prompt:
          type: string
          description: 规则提示词
          example: 审核规则提示词
        category_ids:
          type: array
          items:
            type: string
            description: 分类ID
            example: '1234567890'
        risk_level:
          $ref: '#/components/schemas/RiskLevel'
        referenced_fields:
          type: array
          items:
            $ref: '#/components/schemas/ReviewRuleReferencedField'
    RiskLevel:
      type: integer
      description: |
        风险等级
        - 10: 高风险
        - 20: 中风险
        - 30: 低风险
      enum:
        - 10
        - 20
        - 30
    ReviewRuleReferencedField:
      type: object
      properties:
        category_id:
          type: string
          description: 分类ID
          example: '1234567890'
        category_name:
          type: string
          description: 分类名称
          example: 发票
        fields:
          type: array
          items:
            $ref: '#/components/schemas/ReviewRuleField'
        tables:
          type: array
          items:
            type: object
            properties:
              table_id:
                type: string
                description: 表格ID
                example: '1234567890'
              table_name:
                type: string
                description: 表格名称
                example: 发票表格
              fields:
                type: array
                items:
                  $ref: '#/components/schemas/ReviewRuleField'
    ReviewRuleField:
      type: object
      properties:
        field_id:
          type: string
          description: 字段ID
          example: '1234567890'
        field_name:
          type: string
          description: 字段名称
          example: 发票代码
  securitySchemes:
    ApiId:
      type: apiKey
      in: header
      name: x-ti-app-id
    SecretCode:
      type: apiKey
      in: header
      name: x-ti-secret-code

````