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

# List validation rules

> Retrieve a paginated list of data validation rules with optional filtering by workflow, status, and other criteria



## OpenAPI

````yaml get /v4/data-validation/rules
openapi: 3.0.3
info:
  title: Kadoa API
  version: 3.0.0
  contact:
    name: Support
    email: support@kadoa.com
servers:
  - url: https://api.kadoa.com
security: []
paths:
  /v4/data-validation/rules:
    get:
      tags:
        - Data Validation
        - Rules Library
      description: List validation rules with optional filtering
      parameters:
        - name: groupId
          in: query
          schema:
            type: string
        - name: workflowId
          in: query
          schema:
            type: string
        - name: status
          in: query
          schema:
            type: string
            enum:
              - preview
              - enabled
              - disabled
        - name: page
          in: query
          schema:
            default: 1
            type: number
            minimum: 1
        - name: pageSize
          in: query
          schema:
            default: 50
            type: number
            minimum: 1
            maximum: 100
        - name: includeDeleted
          in: query
          schema:
            oneOf:
              - type: boolean
              - type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RulesListResponse'
        '401':
          description: Unauthorized - Authentication required or failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    description: Indicates an error occurred
                    example: true
                  message:
                    type: string
                    description: Error message
                    example: Authentication required
                required:
                  - error
                  - message
        '500':
          description: Internal Server Error - Unexpected system error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    description: Indicates an error occurred
                    example: true
                  message:
                    type: string
                    description: Error message
                    example: Internal server error
                  details:
                    type: object
                    description: Additional error details
                required:
                  - error
                  - message
      security:
        - ApiKeyAuth: []
components:
  schemas:
    RulesListResponse:
      type: object
      properties:
        error:
          type: boolean
          enum:
            - false
        data:
          type: array
          items:
            $ref: '#/components/schemas/Rule'
        pagination:
          $ref: '#/components/schemas/PaginationMeta'
      required:
        - error
        - data
        - pagination
      title: RulesListResponse
      description: Paginated validation rules with metadata
    Rule:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier
          example: abc123
        name:
          type: string
          description: Human-readable rule name
          example: Email Validation Rule
        description:
          type: string
        ruleType:
          type: string
          enum:
            - custom_sql
        workflowId:
          type: string
        groupId:
          type: string
        userId:
          type: string
        teamId:
          type: string
        targetColumns:
          type: array
          items:
            type: string
        parameters:
          type: object
          properties:
            sql:
              type: string
            params:
              type: array
              items:
                nullable: true
            prompt:
              type: string
          required:
            - sql
        status:
          type: string
          enum:
            - preview
            - enabled
            - disabled
        source:
          type: string
          enum:
            - user_input
            - ai_agent
            - preview_suggestion
            - unknown
        disabledReason:
          type: string
          nullable: true
        metadata:
          type: object
          additionalProperties:
            nullable: true
        createdAt:
          type: string
          description: ISO 8601 timestamp
          example: '2024-01-15T10:30:00.000Z'
        updatedAt:
          type: string
          description: ISO 8601 timestamp
          example: '2024-01-15T10:30:00.000Z'
        deletedAt:
          type: string
          description: ISO 8601 timestamp
          example: '2024-01-15T10:30:00.000Z'
          nullable: true
        deletedReason:
          type: string
          nullable: true
      required:
        - id
        - name
        - status
        - createdAt
        - updatedAt
      title: Rule
      description: Complete validation rule with metadata and lifecycle information
    PaginationMeta:
      type: object
      properties:
        page:
          type: integer
          minimum: 1
          description: Page number for pagination
          example: 1
        pageSize:
          type: integer
          minimum: 1
          maximum: 100
          description: Number of items per page
          example: 50
        totalItems:
          type: integer
          minimum: 0
          description: Total number of items available
          example: 150
        totalPages:
          type: integer
          minimum: 0
          description: Total number of pages
          example: 3
      required:
        - page
        - pageSize
        - totalItems
        - totalPages
      title: PaginationMeta
      description: Metadata for paginated responses including page info and totals
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication

````