---
title: "Search snapshots with filters"
method: POST
path: "/backup-and-dr/snapshots/search"
---

# Search snapshots with filters

`POST /backup-and-dr/snapshots/search`

Advanced search endpoint for querying snapshots with multiple filters

## Request body

- SnapshotSearchRequest
  - `query` SnapshotQueryParams
    - `filters` object[] — Array of filters to apply
      - `key` 'policy_id' | 'status' | 'integration_id' | 'region' | 'is_latest', required
      - `values` string[], required
    - `scopes` ScopeConfig[] — Filter by scope configs (e.g., tags, resource_groups)
      - `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")
    - `from_date` string, date-time — Filter snapshots from this date
    - `to_date` string, date-time — Filter snapshots until this date
    - `sort_by` 'status' | 'snapshot_time' | 'created_at' — Field to sort by
    - `sort_order` 'asc' | 'desc' — Sort order (asc or desc)
  - `page` integer
  - `page_size` integer
  - `facet_page` integer — Page number for facet values pagination
  - `facet_page_size` integer — Page size for facet values pagination
  - `facet_fields` string[] — Specific facet fields to return (empty = all available facets)

## Response `200`

Snapshot list

- SnapshotListResponse
  - `data` Snapshot[]
    - `account_id` string, required
    - `snapshot_id` string, required
    - `snapshot_time` string, date-time
    - `policy_id` string, required
    - `provider_type` string — Provider type (e.g., "aws", "azure", "gcp")
    - `integration_id` string — Integration ID (stored as separate column, not in scope)
    - `region` string — Region (stored as separate column, not in scope)
    - `trigger` object
      - `type` 'scheduled' | 'on-demand' — How the snapshot was triggered
      - `initiated_by` string — User email for on-demand, or 'policy' for scheduled
    - `scope` ScopeConfig[] — Scope configuration array. At least one scope type must be provided (e.g., tags, resource_group, asset_types, exclude_asset_types, or selected_resources). Note: integration_id and region are stored as separate fields, not in this scope array.
      - `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")
    - `status` 'Pending' | 'In Progress' | 'Success' | 'Failed'
    - `is_latest` boolean — Indicates if this is the latest snapshot for the policy
    - `created_at` string, date-time
    - `asset_types` string[] — List of distinct asset type names from snapshot resources (populated on read only)
    - `changed_atrs` ChangedATR[] — Internal field - ATRs of resources that were added or removed (populated when status is Success, for worker use)
      - `integration_id` string, required — Integration ID
      - `asset_type` string, required — Asset type
      - `regions` string[], required — List of regions for this integration_id and asset_type combination
    - `error_code` 'SCOPE_EMPTY' | 'INTERNAL_ERROR', nullable — Error code when status is Failed. Null for non-failed snapshots. SCOPE_EMPTY: no resources matched the policy scope. INTERNAL_ERROR: system failure, customer should retry or contact support.
  - `pagination` Pagination
    - `page` integer, required
    - `page_size` integer, required
    - `total` integer, required
    - `has_next` boolean, required
    - `has_prev` boolean, required
  - `summary` object
    - `total_snapshots` integer
    - `successful_snapshots` integer
    - `failed_snapshots` integer
    - `in_progress_snapshots` integer
  - `facets` Facet[] — Available filter options with counts
    - `field` string, required — The name of the field (e.g., 'integration_id', 'region', 'status')
    - `size` integer, required — The total number of unique values for this field
    - `pagination` Pagination, required
      - `page` integer, required
      - `page_size` integer, required
      - `total` integer, required
      - `has_next` boolean, required
      - `has_prev` boolean, required
    - `values` FacetValue[], required — Array of available values with their occurrence counts
      - `value` string — The value of the facet (e.g., 'us-east-1', 'Active')
      - `count` integer — Number of items that match this value

---

[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)
