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

# Bulk Preview

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

## Request

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

Preview which tables will be affected by a bulk rule generation.

Shows matching tables and identifies those that already have rules.

## Query parameters

- `asset_id` string, required: Asset UUID to search within
- `event_types` string[], nullable: Event types to check for existing rules (comma-separated)

## Headers

- `Authorization` string

## Request body

- BulkPreviewRequest: Request to preview bulk rule generation.
  - `filter` BulkFilter, required: Combined filter for bulk table selection. At least one filter must be specified. Multiple filters are combined with OR.
    - `schema_filter` SchemaFilter: Filter for selecting tables by schema name pattern. Uses SQL LIKE syntax (% for any chars, _ for single char). Example: { "schema_pattern": "analytics%" }
      - `schema_pattern` string, required: Schema name pattern (SQL LIKE syntax: % for any, _ for single char)
    - `table_pattern_filter` TablePatternFilter: Filter for selecting tables by table name pattern. Uses SQL LIKE syntax (% for any chars, _ for single char). Must include at least one wildcard character. Example: { "table_pattern": "%_fact", "schema_pattern": "analytics" # Optional: restrict to specific schema }
      - `table_pattern` string, required: Table name pattern (SQL LIKE syntax, must include wildcard)
      - `schema_pattern` string, nullable: Optional schema pattern to restrict search
    - `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)
