# API-Referenz für Monitoring-Integrationen

Source: https://instatus.com/help/de/api/monitoring-integrations

Über die REST-API können Sie Monitoring-Integrationen von Drittanbietern programmatisch erstellen.

## Integration erstellen

**Endpunkt:**

```bash
POST /v3/integrations
```

**Body-Parameter**

| Feld | Typ | Beschreibung |
| ----- | ---- | ----------- |
| `pageId` | `string` | ID der Statusseite |
| `integrationType` | `string` | Integrationstyp, z. B. `PINGDOM`, `NEWRELIC` |
| `components` | `string[]` | IDs der anzuhängenden Komponenten |

**Beispielanfrage**

```json
{
  "pageId": "page123",
  "integrationType": "PINGDOM",
  "components": ["component1", "component2"]
}
```

**Beispielantwort**

```json
{
  "integration": {
    "id": "int_abc",
    "monitoringTool": "PINGDOM"
  },
  "message": "Integration created successfully."
}
```

Dieser Endpunkt akzeptiert jedes Monitoring-Tool, das in unserem [`MonitoringTool`-Enum](https://github.com/instatushq/instatus/blob/master/packages/backend/prisma/schema.prisma) aufgeführt ist.

## Integration aktualisieren

**Endpunkt:**

```bash
PUT /v3/integrations/:integration_id
```

Senden Sie beliebige Felder des Erstellungs-Endpunkts oder neue Vorlagendaten, um Erstellung und Lösung von Vorfällen anzupassen.

**Beispielanfrage**

```json
{
  "label": "Pingdom Primary",
  "createTemplate": { "name": "New incident" },
  "resolveTemplate": { "name": "Incident resolved" }
}
```

**Beispielantwort**

```json
{
  "integration": {
    "id": "int_abc",
    "label": "Pingdom Primary"
  }
}
```

## Integration löschen

**Endpunkt:**

```bash
DELETE /v3/integrations/:integration_id
```

**Beispielantwort**

```json
{}
```
