---
title: "Preview affected resources"
method: POST
path: "/backup-and-dr/policies/preview"
---

# Preview affected resources

`POST /backup-and-dr/policies/preview`

Initiate preview discovery and return preview_id with total count. Preview ID is calculated server-side from region and scope configuration. Use GET endpoint to retrieve paginated resources.

## Request body

- PreviewRequest
  - `integration_id` string, required — Integration ID to filter resources
  - `region` string, required — AWS region (e.g., us-east-1)
  - `scopes` ScopeConfig[] — Optional scope filters (e.g., tags or resource_group). If omitted or empty, all resources in the region will be discovered.
    - `type` 'tags' | 'resource_group' | 'asset_types' | 'exclude_asset_types' | 'selected_resources', required — Scope type identifier (display name): - tags: Tag-based filtering (maps to Elasticsearch field: tagsList.keyword) - resource_group: Azure resource group filtering (maps to Elasticsearch field: providerGroupId.keyword) - asset_types: Asset type filtering (maps to Elasticsearch field: assetType.keyword) - exclude_asset_types: Exclude asset type filtering (maps to Elasticsearch field: assetType.keyword). When combined with asset_types, exclusions take precedence. - selected_resources: Specific resources by FRN (union with other scope filters)
    - `value` string[], required — Array of scope values: - tags: Tag strings in "key:value" format (e.g., "env:prod", "team:platform") - resource_group: Azure resource group names (e.g., "rg-prod", "rg-staging") - asset_types: Asset type names (e.g., "aws_instance", "aws_s3_bucket", "azurerm_compute_virtual_machine") - exclude_asset_types: Asset type names to exclude (e.g., "aws_instance", "aws_s3_bucket"). When combined with asset_types, exclusions take precedence. - selected_resources: FRN strings (e.g., "frn:aws:123:us-east-1:ec2:i-abc123")
  - `policy_id` string — Optional policy ID for snapshot workflows (enables isolation per policy). If omitted, treated as preview request with caching.

## Response `200`

Preview initiated with preview_id and total count. Use GET endpoint to retrieve paginated resources.

- PreviewInitiatedResponse
  - `preview_id` string, required — Unique preview identifier for retrieving resources
  - `integration_id` string, required — Integration ID
  - `total_count` integer, required — Total number of discovered resources

## Other responses

- `400` — Invalid request
- `500` — Internal server error

---

[API](https://skmtc.net/firefly/apis/backup-dr-api.md) · [All operations](https://skmtc.net/firefly/apis/backup-dr-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/firefly/backup-dr-api/revisions/ff4cd0352ad5/schema)
