---
title: "Preview Alert Targets"
method: POST
path: "/api/v1/alert-rules/preview"
tags: ["alert-rules"]
---

# Preview Alert Targets

`POST /api/v1/alert-rules/preview`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/api/v1/alert-rules/preview`
- Auth: none declared

Preview which tables will be monitored by an alert rule.

## Query parameters

- `asset_id` string, nullable: Asset UUID for resolving tags/lineage filters (required if using filters)

## Headers

- `Authorization` string

## Request body

- PreviewAlertTargetsRequest: Request schema for previewing alert rule targets.
  - `asset_ids` string[], nullable
  - `tag_filter` TagFilter: Filter for selecting tables by tags. Example: { "tag_names": ["revenue", "orders"], "tag_categories": ["business"], "match_mode": "any" }
    - `tag_names` string[], nullable: List of tag names to match
    - `tag_categories` string[], nullable: List of tag categories to match
    - `match_mode` 'any' | 'all': 'any' for OR logic, 'all' for AND logic
  - `lineage_filter` LineageFilter: Filter for selecting tables by lineage relationships. Example: { "upstream_of": "dbt://models/gold/customer_summary", "downstream_of": null, "max_hops": 5 }
    - `upstream_of` string, nullable: Unique ID or table path to find upstream nodes of
    - `downstream_of` string, nullable: Unique ID or table path to find downstream nodes of
    - `max_hops` integer, nullable: Maximum hops to traverse (1-10, null=unlimited)

## Response `200`

Successful Response

- StandardResponse: Standard API response wrapper.
  - `success` boolean, required
  - `data` unknown
  - `message` string, nullable
  - `error` string, nullable
  - `meta` object, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api.md) · [All operations](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anomalyarmor/apis/anomalyarmor-api/revisions/51c755fb5d0b?raw)
