Aktionen-API
ENTWURF — Nur für interne Entwickler
Diese API-Referenz ist für interne Entwicklungsteams bestimmt.
Übersicht
Was es ist: Die Aktionen-API ermöglicht die Verwaltung automatisierter Aktionen, die Discovery als Reaktion auf Auslöser und Workflows ausführt. Aktionen umfassen das Versenden von E-Mails, das Erstellen von Incidents und benutzerdefinierte Operationen.
Endpunkte
| Methode | Pfad | Beschreibung | Authentifizierung erforderlich |
|---|---|---|---|
GET | /api/v1/actions | Alle Aktionen auflisten | JWT + API-Token |
GET | /api/v1/actions/:actionID | Eine bestimmte Aktion abrufen | JWT + API-Token |
PUT | /api/v1/actions/:actionID | Eine Aktion aktualisieren | JWT + API-Token |
DELETE | /api/v1/actions/:actionID | Eine Aktion löschen | JWT + API-Token |
POST | /api/v1/actions/:actionID/send-email | E-Mail-Aktion ausführen | JWT + API-Token |
POST | /api/v1/actions/:actionID/create-incident | Incident-Erstellung ausführen | JWT + API-Token |
GET /api/v1/actions
Alle konfigurierten Aktionen auflisten.
Anfrage:
http
GET /api/v1/actions
Authorization: Bearer <token>Antwort (200):
json
[
{
"actionID": "action-uuid-001",
"name": "Notify Admin",
"type": "email",
"enabled": true,
"config": {
"recipients": ["admin@example.com"],
"subject": "Alert: {{trigger.name}}"
}
},
{
"actionID": "action-uuid-002",
"name": "Create ServiceNow Ticket",
"type": "incident",
"enabled": true,
"config": {
"provider": "servicenow",
"priority": "high"
}
}
]PUT /api/v1/actions/:actionID
Eine vorhandene Aktionskonfiguration aktualisieren.
Anfrage:
http
PUT /api/v1/actions/action-uuid-001
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Notify Security Team",
"enabled": true,
"config": {
"recipients": ["security@example.com"],
"subject": "Security Alert: {{trigger.name}}"
}
}Antwort (200): Gibt das aktualisierte Aktionsobjekt zurück.
POST /api/v1/actions/:actionID/send-email
Eine E-Mail-Aktion sofort ausführen.
Anfrage:
http
POST /api/v1/actions/action-uuid-001/send-email
Authorization: Bearer <token>
Content-Type: application/json
{
"context": {
"trigger": "manual",
"entityId": "entity-uuid"
}
}Antwort (200):
json
{
"status": "sent",
"recipients": 1
}POST /api/v1/actions/:actionID/create-incident
Eine Incident-Erstellungsaktion ausführen (z. B. ServiceNow-Ticket).
Anfrage:
http
POST /api/v1/actions/action-uuid-002/create-incident
Authorization: Bearer <token>
Content-Type: application/json
{
"context": {
"trigger": "threat-detection",
"entityId": "entity-uuid",
"severity": "high"
}
}Antwort (200):
json
{
"status": "created",
"incidentId": "INC0012345"
}