LiteLogDocs
English

REST API: Automation

This page belongs to the REST API reference, which covers the address, authentication, scopes, pagination and errors. Every path is appended to https://api.litelog.de/api. In the examples $KEY stands for your API key; the example values are made up.

Overview

Call Purpose Scope
GET /v1/workflow-rules List automation rules workflows:read
POST /v1/workflow-rules Create an automation rule workflows:write
GET /v1/workflow-executions Runs of the automation (history) workflows:read
GET /v1/workflow-executions/{id}/deliveries One run with its deliveries (recipients masked) workflows:read

GET /v1/workflow-rules

List automation rules.

List / create workflows (same shape as the automation editor).

Scope: workflows:read

Parameters

Name In Type Required Description
page query integer no Default: 1; at least 1.
pageSize query integer no Default: 50; 1 – 100.
status query string no Values: active, inactive.

Example call

curl "https://api.litelog.de/api/v1/workflow-rules?page=1&pageSize=50&status=active" \
  -H "X-Api-Key: $KEY"

Example response (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

Create an automation rule.

List / create workflows (same shape as the automation editor).

Scope: workflows:write

Parameters

Name In Type Required Description
X-Change-Reason header string no Reason for the change, URI-encoded, prefixed with a reason code: [correction], [new_requirement], [customer_request], [error_fix], [periodic_review] or [other], e.g. %5Bcorrection%5D%20typo%20in%20name. Required when the tenant policy "Änderungsgrund erforderlich" is on, or when the change needs an approval request; stored in the configuration audit trail. At most 2000 characters.

Body fields (JSON)

The example shows the structure of the body.

Example call

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"
      }
    ]
  }
}'

Example response (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

Runs of the automation (filters: rule_id, status, from/to), without error texts — only for accounts that see all properties.

Scope: workflows:read

Parameters

Name In Type Required Description
page query integer no Default: 1; at least 1.
pageSize query integer no Default: 50; 1 – 100.
rule_id query string (uuid) no —
status query string no Values: pending, running, success, failed, skipped, deduped, scheduled.
from query string (date-time) no —
to query string (date-time) no —

Example call

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"

Example response (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

One run with its deliveries: channel, masked recipient (j***@firma.de, +49 *** ** 12), status, time; push and in-app as counts only.

Scope: workflows:read

Parameters

Name In Type Required Description
id path string (uuid) yes —

Example call

curl "https://api.litelog.de/api/v1/workflow-executions/e2a9c4f7-6b1d-4c8e-b35a-0d7f2e9a1c64/deliveries" \
  -H "X-Api-Key: $KEY"

Example response (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
      }
    ]
  }
}