---
title: "Preview an asset rule"
method: POST
path: "/asset-rules/preview"
tags: ["asset-rules"]
---

# Preview an asset rule

`POST /asset-rules/preview`

Preview which assets would match a rule configuration

## Request body

- PreviewRequest
  - `limit` integer
  - `metadata_field` string
  - `pattern_type` string
  - `pattern_value` string
  - `query_expression` string
  - `rule_type` string

## Response `200`

OK

- RulePreview
  - `asset_count` integer
  - `asset_ids` string[]
  - `errors` string[]

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

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