{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sifflet/json-schema/sifflet-search-collection-rule-run-dto-schema.json",
  "title": "SearchCollectionRuleRunDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sifflet-rule-run-api-openapi.yml#/components/schemas/SearchCollectionRuleRunDto",
  "required": [
    "data"
  ],
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RuleRunDto"
      }
    },
    "totalElements": {
      "type": "integer",
      "format": "int64"
    }
  },
  "$defs": {
    "ParameterizedQueryDto": {
      "required": [
        "positionalParameters",
        "query"
      ],
      "type": "object",
      "properties": {
        "positionalParameters": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PositionalParameterDto"
          }
        },
        "query": {
          "type": "string"
        }
      }
    },
    "PositionalParameterDto": {
      "type": "object",
      "properties": {
        "value": {
          "type": "object"
        }
      }
    },
    "RuleRunDto": {
      "required": [
        "canShowFailingRows",
        "debuggable",
        "hasGraph",
        "hasGroupBy",
        "id"
      ],
      "type": "object",
      "properties": {
        "canShowFailingRows": {
          "type": "boolean",
          "deprecated": true
        },
        "createdBy": {
          "type": "string"
        },
        "createdDate": {
          "type": "integer",
          "format": "int64"
        },
        "debugSql": {
          "$ref": "#/$defs/ParameterizedQueryDto"
        },
        "debuggable": {
          "type": "boolean"
        },
        "endDate": {
          "type": "integer",
          "format": "int64"
        },
        "hasGraph": {
          "type": "boolean"
        },
        "hasGroupBy": {
          "type": "boolean"
        },
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "incidentIssue": {
          "type": "integer",
          "format": "int32"
        },
        "incidentName": {
          "type": "string"
        },
        "incidentStatus": {
          "type": "string",
          "enum": [
            "OPEN",
            "IN_PROGRESS",
            "CLOSED"
          ]
        },
        "result": {
          "type": "string"
        },
        "ruleId": {
          "type": "string",
          "format": "uuid"
        },
        "startDate": {
          "type": "integer",
          "format": "int64"
        },
        "status": {
          "type": "string",
          "enum": [
            "PENDING",
            "RUNNING",
            "SUCCESS",
            "REQUIRES_YOUR_ATTENTION",
            "TECHNICAL_ERROR",
            "FAILED"
          ]
        },
        "type": {
          "type": "string",
          "enum": [
            "MANUAL",
            "SCHEDULED",
            "DBT"
          ]
        },
        "values": {
          "$ref": "#/$defs/RuleRunValuesDto"
        }
      }
    },
    "RuleRunExpectedValuesDto": {
      "type": "object",
      "properties": {
        "max": {
          "type": "number",
          "format": "float"
        },
        "min": {
          "type": "number",
          "format": "float"
        }
      }
    },
    "RuleRunValuesDto": {
      "type": "object",
      "properties": {
        "actual": {
          "type": "number",
          "format": "float"
        },
        "expected": {
          "$ref": "#/$defs/RuleRunExpectedValuesDto"
        }
      }
    }
  }
}