---
title: "TCP Monitor Ausfall-Historie abrufen"
description: "Gibt paginierte Vorfälle eines einzelnen TCP Monitors zurück, inklusive berechneter Dauer."
---

`GET /api/tcp-monitors/:tcpMonitorPublicId/incident-history`

## Authentifizierung

Erfordert eine gültige Session.

- Header: `Authorization: Bearer <token>`

## Parameter

- `tcpMonitorPublicId` (Pfad, erforderlich): Öffentliche UUID des TCP Monitors.

## Query Parameter

- `page` (number, optional): Seite (Default: `1`).
- `limit` (number, optional): Einträge pro Seite (Default: `25`; Max `100`). Wird bei `format=csv` oder `download=1` durch die Export-Defaults ersetzt (Default `10000`, Max `50000`).
- `status` (string, optional): `open`, `acknowledged` oder `resolved`.
- `type` (string, optional): `downtime`, `http_status`, `ssl_expiry`, `ssl_critical`, `ssl_warning`, `response_time`, `dnsbl`, `domain_expiry_warning`, `critical` oder `inconclusive`.
- `from` / `to` (ISO-Datumsstring, optional): Filter nach `startedAt`-Bereich.
- `format` (string, optional): `json` (Default) oder `csv`.
- `download` (string, optional): `1` erzwingt einen Attachment-Download.

## Beispiel (cURL)

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

curl -X GET "$BASE_URL/api/tcp-monitors/11111111-1111-4111-8111-111111111111/incident-history" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Accept: application/json"
```

## Beispiel-Antwort

```json
{
  "data": [
    {
      "id": 123,
      "publicId": "55555555-5555-4555-8555-555555555555",
      "type": "downtime",
      "status": "resolved",
      "startedAt": "2026-02-26T12:10:00.000Z",
      "endedAt": "2026-02-26T12:12:30.000Z",
      "durationMs": 150000,
      "duration": "2m 30s",
      "statusCode": null,
      "errorMessage": "connect ETIMEDOUT",
      "details": "connect ETIMEDOUT",
      "isOngoing": false
    }
  ],
  "total": 1,
  "page": 1,
  "pageCount": 1
}
```

`status` ist `open`, `acknowledged` oder `resolved`. Laufende Vorfälle haben ein `null` bei `endedAt` und `isOngoing: true`.

Bei `format=csv` (oder `download=1`) ist die Response ein `text/csv`-Attachment (bzw. `application/json` bei `format=json&download=1`) anstelle der paginierten JSON-Antwort oben.

## Häufige Fehler

- `400 TCP monitor public ID (UUID) required` wenn `:tcpMonitorPublicId` ungültig ist
- `401 Unauthorized` wenn du nicht angemeldet bist
- `403 Forbidden` wenn du keinen Zugriff auf den Monitor hast
