---
title: "Maintenance Windows auflisten"
description: "Gibt alle Wartungsfenster zurück, die für den authentifizierten Benutzer sichtbar sind, gefiltert nach Organisation und optionalem Kunden-Filter."
---

`GET /api/maintenance-windows`

## Query-Parameter

- `customerId` (optional): Fenster nach Kunden-ID filtern.
- `organizationId` (optional): Standardmäßig die Organisation der Sitzung.

## Beispiel (cURL)

```bash
BASE_URL="https://uptimeify.io"
TOKEN="<dein-api-token>"

curl -X GET "$BASE_URL/api/maintenance-windows?customerId=1" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json"
```

## Antwort (Response)

```json
[
  {
    "id": 42,
    "publicId": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
    "organizationId": 10,
    "customerId": 1,
    "name": "Wöchentliches Deployment",
    "description": "Rollierendes Update jeden Montag",
    "startTime": "2026-07-07T02:00:00.000Z",
    "endTime": "2026-07-07T04:00:00.000Z",
    "isRecurring": true,
    "recurrencePattern": {
      "frequency": "weekly",
      "interval": 1,
      "daysOfWeek": [1]
    },
    "isActive": true,
    "timezone": "UTC",
    "targets": [
      { "type": "website", "id": 101 },
      { "type": "icmp", "id": 5 }
    ],
    "tags": [
      { "id": 7, "name": "Production", "color": "red" }
    ],
    "websiteId": null,
    "icmpMonitorId": null,
    "smtpMonitorId": null,
    "sshMonitorId": null,
    "ftpMonitorId": null,
    "imapPopMonitorId": null,
    "dnsMonitorId": null,
    "customerIpId": null,
    "customerDomainId": null,
    "createdAt": "2026-06-01T09:00:00.000Z",
    "updatedAt": "2026-06-01T09:00:00.000Z"
  }
]
```

Jedes Fenster enthält:

- `targets`: Array von `{ type, id }`-Objekten für alle explizit ausgewählten Monitore (`type` ist eines von `website` | `dns` | `icmp` | `smtp` | `ssh` | `ftp` | `imap_pop`).
- `tags`: Array von Tag-Objekten `{ id, name, color }` für tag-basierte Abdeckung; ein leeres Array, wenn das Fenster keine Tag-Auswahl verwendet.
- Legacy-Felder für einzelne Ziele (`websiteId`, `icmpMonitorId` usw.) bleiben aus Gründen der Abwärtskompatibilität vorhanden; sie sind `null`, wenn eine Multi-Target- oder Tag-Auswahl verwendet wird.

## Häufige Fehler

- `401 Unauthorized` wenn du nicht angemeldet bist
- `403 Forbidden` wenn du keinen Zugriff auf die Organisation hast
