---
title: "Preview what a downtime covers"
method: POST
path: "/api/v2/{org_id}/downtimes/preview"
tags: ["Downtimes"]
---

# Preview what a downtime covers

`POST /api/v2/{org_id}/downtimes/preview`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/v2/{org_id}/downtimes/preview`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/v2/:org_id/downtimes/preview/post.ts> (a function with typed inputs; its response is checked against the schema)

Lists, per module, what the targets match today, the alerts decided at fire time, and the items a resource refinement cannot decide. Entries are limited to resources the user may read; totals count everything.

## Path parameters

- `org_id` string, required

## Request body

- PreviewRequest
  - `condition` union: A tree of dimension tests (D17); one AND group of `=` pairs is an on-call `OwnershipRule`.
    - object
      - `items` object[], required
      - `op` 'and' | 'or', required
      - `type` 'group', required
    - object: `value` may end in `*`, a prefix, as in ownership rules.
      - `key` string, required
      - `operator` '=' | '!=', required
      - `type` 'pair', required
      - `value` string, required
  - `targets` DowntimeTarget[], required
    - `folders` union, required
      - object
        - `kind` 'all', required
      - object
        - `folder_ids` string[], required
        - `kind` 'some', required
    - `ids` string[]
    - `incident_mode` 'muted' | 'none': What a suppressed alert firing does to incidents during the window.
    - `module` 'alerts' | 'anomaly_detections' | 'synthetics' | 'slos', required
    - `slo_mode` 'exclude' | 'count_as_good'
    - `tags` string[]: Synthetics only.

## Response `200`

Success

- PreviewResponse
  - `alerts` PreviewMatch[], required
    - `applies` boolean, nullable: SLOs on the detail page: false when the current or next window holds no slice start.
    - `folder_id` string, required
    - `id` string, required
    - `matched_by` string, nullable
    - `missing` string, nullable
    - `name` string, required
  - `alerts_total` integer, required
  - `anomalies` PreviewMatch[], required
    - `applies` boolean, nullable: SLOs on the detail page: false when the current or next window holds no slice start.
    - `folder_id` string, required
    - `id` string, required
    - `matched_by` string, nullable
    - `missing` string, nullable
    - `name` string, required
  - `anomalies_total` integer, required
  - `resolved_at_fire_time` PreviewMatch[], required
    - `applies` boolean, nullable: SLOs on the detail page: false when the current or next window holds no slice start.
    - `folder_id` string, required
    - `id` string, required
    - `matched_by` string, nullable
    - `missing` string, nullable
    - `name` string, required
  - `slos` PreviewMatch[], required
    - `applies` boolean, nullable: SLOs on the detail page: false when the current or next window holds no slice start.
    - `folder_id` string, required
    - `id` string, required
    - `matched_by` string, nullable
    - `missing` string, nullable
    - `name` string, required
  - `slos_total` integer, required
  - `synthetics` PreviewMatch[], required
    - `applies` boolean, nullable: SLOs on the detail page: false when the current or next window holds no slice start.
    - `folder_id` string, required
    - `id` string, required
    - `matched_by` string, nullable
    - `missing` string, nullable
    - `name` string, required
  - `synthetics_total` integer, required
  - `undecidable` object, required

## Other responses

- `403`: Forbidden or not enabled

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
