---
title: "Dry Run"
method: POST
path: "/api/v1/alerts/dry-run"
tags: ["ALERTS_V1"]
---

# Dry Run

`POST /api/v1/alerts/dry-run`

Evaluate a rule config on-the-fly without persisting anything.

Accepts the same JSON shape as RuleCreateRequest / the saved column,
so the payload can be copy-pasted directly.

## Request body

- DryRunRequest — Run evaluation against a rule config without saving. Accepts the same shape as RuleCreateRequest so the payload can be copy-pasted from the saved column / frontend config JSON.
  - `name` string, nullable
  - `rule_type` string, nullable
  - `platform` string, nullable
  - `entity_type` string, required
  - `metric_config` MetricConfig, required — Typed representation of the metric_config JSON stored in alert rules.
    - `metric_name` string, required — Metric identifier, e.g. 'warehouse_daily_cost'
    - `params` MetricParams — Evaluation parameters within a metric config.
      - `comparison_type` string — 'absolute_value' or 'relative_value'
      - `threshold_type` string — 'exceeds', 'below', 'changes_by', or 'changes_by_percent'
      - `threshold_value` number — Threshold to compare against
      - `aggregation` string — 'sum', 'mean', 'max', or 'min'
      - `date_range` string — 'previous_day', 'previous_week', 'previous_month', or 'previous_year'
      - `is_percentage` boolean, nullable — Derived from threshold_type; included by templates
    - `filters` MetricFilter[]
      - `key` string, required — Filter dimension name, e.g. 'warehouse'
      - `value` string[] — Filter values, e.g. ['WH1', 'WH2'], ['all'], or ['ANY']
      - `order` integer — Display order of this filter
    - `category` string, nullable — Entity type echo; included by templates
  - `delivery` object, nullable — Ignored for evaluation; accepted so full rule JSON can be pasted.
  - `reference_time` string, date-time, nullable — Evaluate as if 'now' were this timestamp (ISO-8601). Defaults to UTC now.

## Response `200`

Successful Response

- RunResultResponse
  - `run_id` string, nullable
  - `rule_id` integer, nullable
  - `metric_name` string, required
  - `current_value` number, required
  - `previous_value` number, nullable
  - `change` number, nullable
  - `change_percent` number, nullable
  - `threshold_breached` boolean, required
  - `status` string, required
  - `error` string, nullable
  - `executed_at` string, date-time, required
  - `breaching_entities` object[], nullable — For per-entity ('ANY') rules: the warehouses that breached, each {entity, current_value, previous_value, change, change_percent}, worst first. Null for ordinary rules.
  - `request` object, nullable — Echo of the resolved request config (dry-run only)
  - `queries` QueryLogResponse[] — SQL queries executed during evaluation
    - `label` string, required
    - `sql` string, required
    - `params` object
    - `period_start` string, nullable
    - `period_end` string, nullable
    - `value` number, nullable
    - `elapsed_ms` number, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/myaltimate/apis/fastapi.md) · [All operations](https://skmtc.net/myaltimate/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/myaltimate/fastapi/versions/aab3fe5c9f05/schema)
