---
title: "End or cancel a downtime"
method: POST
path: "/api/v2/{org_id}/downtimes/{downtime_id}/cancel"
tags: ["Downtimes"]
---

# End or cancel a downtime

`POST /api/v2/{org_id}/downtimes/{downtime_id}/cancel`

## 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/{downtime_id}/cancel`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/v2/:org_id/downtimes/:downtime_id/cancel/post.ts> (a function with typed inputs; its response is checked against the schema)

Ends an active window now, or calls off a scheduled one. The row stays for history.

## Path parameters

- `org_id` string, required
- `downtime_id` string, required

## Response `200`

Cancelled

- Downtime
  - `alert_groups` AlertGroupRef[], nullable: Narrows targets to these groups; older nodes ignore it and mute the whole alert.
    - `alert_id` string, required
    - `group_key` string
    - `group_labels` object, nullable: Captured at mute time because `group_key` is a hash the UI cannot show.
  - `cancelled_at` integer, nullable
  - `cancelled_by` string, nullable
  - `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
  - `created_at` integer, required
  - `created_by` string, required
  - `end_on_clear` EndOnClear: "Until it clears": `group_key` null ends the downtime when no group of the alert is firing.
    - `alert_id` string, required
    - `group_key` string, nullable
  - `folder_id` string
  - `id` string, required
  - `name` string, required
  - `notifications` DowntimeNotifications
    - `continues` string, nullable: The id of the recurring downtime whose window this extension follow-up continues.
    - `destinations` string[]
    - `ending_soon_lead_secs` integer
    - `events` NotificationEvents
      - `cancelled` boolean
      - `ended` boolean
      - `ending_soon` boolean
      - `extended` boolean
      - `started` boolean
  - `org` string, required
  - `origin_region` string, nullable
  - `reason` string, nullable
  - `schedule` DowntimeSchedule, required
    - `duration_secs` integer, required
    - `ends_at` integer, nullable: Microseconds UTC; a recurring row reads only its local date, an inclusive last day.
    - `repeat` 'none' | 'daily' | 'weekly', required
    - `start_time_local` string, nullable: `HH:MM` in `timezone`, recurring rows only.
    - `starts_at` integer, required: Microseconds UTC.
    - `timezone` string, required
    - `weekdays` integer[]: ISO weekdays, 1 is Monday.
  - `show_banner` boolean: Show a warning banner to everyone in the org while a window is active (D19).
  - `source` 'slack' | 'openobserve' | 'api': Where a quick mute came from; the web app's own calls are `openobserve`.
  - `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.
  - `updated_at` integer, required
  - `updated_by` string, required
  - `version` integer

## Other responses

- `403`: Forbidden or not enabled
- `404`: Not found

---

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