REST-API: Automatik
Diese Seite gehört zur REST-API-Referenz. Dort stehen Adresse, Anmeldung, Scopes, Paginierung und Fehler. Alle Pfade hängen an https://api.litelog.de/api. In den Beispielen steht $KEY für Ihren API-Schlüssel; die Beispielwerte sind erfunden.
Übersicht
| Aufruf | Zweck | Scope |
|---|---|---|
GET /v1/workflow-rules |
Abläufe der Automatik auflisten | workflows:read |
POST /v1/workflow-rules |
Ablauf der Automatik anlegen | workflows:write |
GET /v1/workflow-executions |
Läufe der Automatik auflisten | workflows:read |
GET /v1/workflow-executions/{id}/deliveries |
Einen Lauf mit seinen Zustellungen lesen (Empfänger verkürzt) | workflows:read |
GET /v1/workflow-rules
Abläufe der Automatik auflisten.
Abläufe auflisten bzw. anlegen (gleicher Aufbau wie der Automatik-Editor).
Berechtigung (Scope): workflows:read
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
page |
Query | integer | nein | Standard: 1; mindestens 1. |
pageSize |
Query | integer | nein | Standard: 50; 1 – 100. |
status |
Query | string | nein | Werte: active, inactive. |
Beispielaufruf
curl "https://api.litelog.de/api/v1/workflow-rules?page=1&pageSize=50&status=active" \
-H "X-Api-Key: $KEY"
Beispielantwort (200)
{
"data": [
{
"id": "7c1a5e90-2d4b-4f3a-9e6c-8b0d1f2a3c47",
"user_id": 284,
"name": "Meldung erfasst → Push an Objektpersonal",
"enabled": true,
"enabled_at": "2026-12-01T08:15:00.000Z",
"trigger_type": "incident.created",
"source": "user",
"graph": {
"nodes": [
{
"id": "t",
"type": "trigger",
"position": {
"x": 0,
"y": 0
},
"data": {
"trigger_type": "incident.created"
}
},
{
"id": "a",
"type": "action",
"position": {
"x": 200,
"y": 0
},
"data": {
"action": {
"type": "send_push",
"recipients": {
"strategy": "property_assigned"
},
"config": {
"title": "Hinweis",
"body": "Bitte prüfen."
}
}
}
}
],
"edges": [
{
"id": "e1",
"source": "t",
"target": "a"
}
]
},
"scope_type": null,
"scope_property_id": null,
"scope_customer_id": null,
"created_at": "2026-12-01T08:15:00.000Z",
"updated_at": "2026-12-01T08:15:00.000Z",
"deleted_at": null
}
],
"total": 1,
"page": 1,
"pageSize": 50
}
POST /v1/workflow-rules
Ablauf der Automatik anlegen.
Abläufe auflisten bzw. anlegen (gleicher Aufbau wie der Automatik-Editor).
Berechtigung (Scope): workflows:write
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
X-Change-Reason |
Header | string | nein | Grund der Änderung, URI-kodiert, mit vorangestelltem Grund-Code: [correction], [new_requirement], [customer_request], [error_fix], [periodic_review] oder [other], z. B. %5Bcorrection%5D%20Tippfehler%20im%20Namen. Pflicht, wenn die Firma „Änderungsgrund erforderlich“ eingeschaltet hat oder die Änderung einen Antrag braucht; steht im Änderungsverlauf der Einstellungen. Höchstens 2000 Zeichen. |
Felder im Rumpf (JSON)
Den Aufbau des Rumpfs zeigt das Beispiel.
Beispielaufruf
curl -X POST "https://api.litelog.de/api/v1/workflow-rules" \
-H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
-d '{
"name": "Meldung erfasst → Push an Objektpersonal",
"enabled": true,
"graph": {
"nodes": [
{
"id": "t",
"type": "trigger",
"position": {
"x": 0,
"y": 0
},
"data": {
"trigger_type": "incident.created"
}
},
{
"id": "a",
"type": "action",
"position": {
"x": 200,
"y": 0
},
"data": {
"action": {
"type": "send_push",
"recipients": {
"strategy": "property_assigned"
},
"config": {
"title": "Hinweis",
"body": "Bitte prüfen."
}
}
}
}
],
"edges": [
{
"id": "e1",
"source": "t",
"target": "a"
}
]
}
}'
Beispielantwort (201)
{
"data": {
"id": "7c1a5e90-2d4b-4f3a-9e6c-8b0d1f2a3c47",
"user_id": 284,
"name": "Meldung erfasst → Push an Objektpersonal",
"enabled": true,
"enabled_at": "2026-12-01T08:15:00.000Z",
"trigger_type": "incident.created",
"source": "user",
"graph": {
"nodes": [
{
"id": "t",
"type": "trigger",
"position": {
"x": 0,
"y": 0
},
"data": {
"trigger_type": "incident.created"
}
},
{
"id": "a",
"type": "action",
"position": {
"x": 200,
"y": 0
},
"data": {
"action": {
"type": "send_push",
"recipients": {
"strategy": "property_assigned"
},
"config": {
"title": "Hinweis",
"body": "Bitte prüfen."
}
}
}
}
],
"edges": [
{
"id": "e1",
"source": "t",
"target": "a"
}
]
},
"scope_type": null,
"scope_property_id": null,
"scope_customer_id": null,
"created_at": "2026-12-01T08:15:00.000Z",
"updated_at": "2026-12-01T08:15:00.000Z",
"deleted_at": null
}
}
GET /v1/workflow-executions
Läufe der Automatik (Filter: rule_id, status, from/to), ohne Fehlertexte — nur für Zugänge, die alle Objekte sehen.
Berechtigung (Scope): workflows:read
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
page |
Query | integer | nein | Standard: 1; mindestens 1. |
pageSize |
Query | integer | nein | Standard: 50; 1 – 100. |
rule_id |
Query | string (uuid) | nein | — |
status |
Query | string | nein | Werte: pending, running, success, failed, skipped, deduped, scheduled. |
from |
Query | string (date-time) | nein | — |
to |
Query | string (date-time) | nein | — |
Beispielaufruf
curl "https://api.litelog.de/api/v1/workflow-executions?page=1&pageSize=50&status=success&from=2026-12-01T00:00:00Z&to=2026-12-31T23:59:59Z" \
-H "X-Api-Key: $KEY"
Beispielantwort (200)
{
"data": [
{
"run_id": "e2a9c4f7-6b1d-4c8e-b35a-0d7f2e9a1c64",
"rule_id": "b84f2d6a-91c3-4e07-8a5d-3f6e9c1b7d20",
"rule_name": "Krankmeldung eingegangen → Verantwortliche",
"rule_source": "system",
"trigger_type": "absence.reported",
"status": "success",
"attempts": 1,
"created_at": "2026-12-02T06:42:10.000Z",
"fired_at": "2026-12-02T06:42:11.000Z"
},
{
"run_id": "5d0b7e3c-a8f2-4196-9c4e-1b6a3d8f7e02",
"rule_id": "7c1a5e90-2d4b-4f3a-9e6c-8b0d1f2a3c47",
"rule_name": "Meldung erfasst → Push an Objektpersonal",
"rule_source": "user",
"trigger_type": "incident.created",
"status": "success",
"attempts": 1,
"created_at": "2026-12-01T09:30:00.000Z",
"fired_at": "2026-12-01T09:30:01.000Z"
}
],
"total": 2,
"page": 1,
"pageSize": 50
}
GET /v1/workflow-executions/{id}/deliveries
Ein Lauf mit seinen Zustellungen: Kanal, Empfänger verkürzt (j***@firma.de, +49 *** ** 12), Status, Zeit; Push und In-App nur als Zahlen.
Berechtigung (Scope): workflows:read
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id |
Pfad | string (uuid) | ja | — |
Beispielaufruf
curl "https://api.litelog.de/api/v1/workflow-executions/e2a9c4f7-6b1d-4c8e-b35a-0d7f2e9a1c64/deliveries" \
-H "X-Api-Key: $KEY"
Beispielantwort (200)
{
"data": {
"run_id": "e2a9c4f7-6b1d-4c8e-b35a-0d7f2e9a1c64",
"rule_id": "b84f2d6a-91c3-4e07-8a5d-3f6e9c1b7d20",
"rule_name": "Krankmeldung eingegangen → Verantwortliche",
"rule_source": "system",
"trigger_type": "absence.reported",
"status": "success",
"attempts": 1,
"created_at": "2026-12-02T06:42:10.000Z",
"fired_at": "2026-12-02T06:42:11.000Z",
"deliveries": [
{
"channel": "email",
"node_id": "action-0",
"recipient_masked": "m***@example.com",
"status": "sent",
"sent_at": "2026-12-02T06:42:11.000Z",
"accounts": null,
"devices": null
},
{
"channel": "push",
"node_id": "action-1",
"recipient_masked": null,
"status": null,
"sent_at": null,
"accounts": 1,
"devices": 2
},
{
"channel": "in_app",
"node_id": "action-2",
"recipient_masked": null,
"status": null,
"sent_at": null,
"accounts": 1,
"devices": 0
}
]
}
}
