> ## Documentation Index
> Fetch the complete documentation index at: https://sure-917046f5-mintlify-docs-update-1787373257103.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List rule runs

> List rule run history for the authenticated user family.



## OpenAPI

````yaml /openapi.yaml get /api/v1/rule_runs
openapi: 3.0.3
info:
  title: Sure API
  version: v1
  description: OpenAPI documentation generated from executable request specs.
servers:
  - url: https://app.sure.am
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
paths:
  /api/v1/rule_runs:
    get:
      tags:
        - Rule Runs
      summary: List rule runs
      description: List rule run history for the authenticated user family.
      parameters:
        - name: page
          in: query
          required: false
          description: 'Page number (default: 1)'
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          description: 'Items per page (default: 25, max: 100)'
          schema:
            type: integer
        - name: rule_id
          in: query
          required: false
          description: Filter by rule ID
          schema:
            type: string
            format: uuid
        - name: status
          in: query
          required: false
          description: Filter by run status
          schema:
            type: string
            enum:
              - pending
              - success
              - failed
        - name: execution_type
          in: query
          required: false
          description: Filter by execution type
          schema:
            type: string
            enum:
              - manual
              - scheduled
        - name: start_executed_at
          in: query
          required: false
          description: Filter runs executed at or after this timestamp
          schema:
            type: string
            format: date-time
        - name: end_executed_at
          in: query
          required: false
          description: Filter runs executed at or before this timestamp
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: rule runs listed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleRunCollection'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: insufficient scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: invalid filter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - apiKeyAuth: []
components:
  schemas:
    RuleRunCollection:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/RuleRun'
        meta:
          type: object
          required:
            - current_page
            - total_pages
            - total_count
            - per_page
          properties:
            current_page:
              type: integer
            next_page:
              type: integer
              nullable: true
            prev_page:
              type: integer
              nullable: true
            total_pages:
              type: integer
            total_count:
              type: integer
            per_page:
              type: integer
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
        message:
          type: string
          nullable: true
        details:
          oneOf:
            - type: array
              items:
                type: string
            - type: object
          nullable: true
        errors:
          type: array
          items:
            type: string
          nullable: true
          description: >-
            Validation error messages (alternative to details used by trades,
            valuations, etc.)
    RuleRun:
      type: object
      required:
        - id
        - rule_id
        - rule_name
        - execution_type
        - status
        - transactions_queued
        - transactions_processed
        - transactions_modified
        - pending_jobs_count
        - executed_at
        - rule
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        rule_id:
          type: string
          format: uuid
        rule_name:
          type: string
          nullable: true
        execution_type:
          type: string
          enum:
            - manual
            - scheduled
        status:
          type: string
          enum:
            - pending
            - success
            - failed
        transactions_queued:
          type: integer
          minimum: 0
        transactions_processed:
          type: integer
          minimum: 0
        transactions_modified:
          type: integer
          minimum: 0
        pending_jobs_count:
          type: integer
          minimum: 0
        executed_at:
          type: string
          format: date-time
        error_message:
          type: string
          nullable: true
        rule:
          type: object
          nullable: true
          required:
            - id
            - resource_type
            - active
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
              nullable: true
            resource_type:
              type: string
            active:
              type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: X-Api-Key
      in: header
      description: API key for authentication. Generate one from your account settings.

````