REST API: Incidents
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/incidents |
List incidents (defect reports) | incidents:read |
POST /v1/incidents |
Create an incident (defect report) | incidents:write |
GET /v1/incidents/{id} |
Get an incident | incidents:read |
POST /v1/incidents/{id}/acknowledge |
Acknowledge an incident | incidents:write |
POST /v1/incidents/{id}/close |
Close an incident | incidents:write |
POST /v1/incidents/{id}/reopen |
Reopen a closed incident | incidents:write |
PATCH /v1/incidents/{id}/classification |
Set category and/or severity of an incident | incidents:write |
POST /v1/incidents/{id}/task |
Create the task for an incident | tasks:write |
GET /v1/incident-categories |
List the tenant's incident categories | incidents:read |
GET /v1/incidents
List incidents (filters: property_id, category_id, severity, status = open/acknowledged/closed, from/to); every row carries status, acknowledged_at, closed_at, category_name, classified_by and archived.
Scope: incidents:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
page |
query | integer | no | Default: 1; at least 1. |
pageSize |
query | integer | no | Default: 50; 1 – 100. |
property_id |
query | integer | no | — |
category_id |
query | integer | no | — |
severity |
query | string | no | Values: low, medium, high, critical. |
status |
query | string | no | open = neither acknowledged nor closed; acknowledged = acknowledged, not closed; closed = closed. Values: open, acknowledged, closed. |
from |
query | string (date-time) | no | — |
to |
query | string (date-time) | no | — |
Example call
curl "https://api.litelog.de/api/v1/incidents?property_id=123&from=2026-12-01T00:00:00Z&to=2026-12-31T23:59:59Z&page=1&pageSize=50" \
-H "X-Api-Key: $KEY"
Example response (200)
{
"data": [
{
"incident_id": 9004,
"uuid": "5b8c1e9f-2d47-4a3b-b6c0-9f4e7a2d1c83",
"property_id": 123,
"account_id": 41,
"text": "Wasserfleck an der Decke im Lager, vermutlich undichte Leitung.",
"severity": "high",
"timestamp": "2026-12-02T17:40:00.000Z",
"lat": null,
"lng": null,
"source": "device",
"status": "open",
"acknowledged_at": null,
"closed_at": null,
"category_id": 11,
"category_name": "Schaden/Beschädigung",
"classified_by": "ai",
"archived": false
},
{
"incident_id": 9001,
"uuid": "d2a7f3b1-8c4e-4b6a-9f05-6e1c3a8d7b24",
"property_id": 123,
"account_id": 5,
"text": "Lampe im Treppenhaus, 2. OG, ist ausgefallen.",
"severity": "high",
"timestamp": "2026-12-01T08:15:00.000Z",
"lat": 48.137154,
"lng": 11.576124,
"source": "api",
"status": "acknowledged",
"acknowledged_at": "2026-12-01T08:32:10.482Z",
"closed_at": null,
"category_id": 14,
"category_name": "Technischer Defekt",
"classified_by": "human",
"archived": false
}
],
"total": 2,
"page": 1,
"pageSize": 50
}
POST /v1/incidents
Create an incident report (property_id, text, optional lat/lng and timestamp = event time for importing past reports; omitted = now, future → 422).
Scope: incidents:write
Body fields (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
property_id |
integer | yes | — |
text |
string | yes | — |
lat |
number | no | — |
lng |
number | no | — |
timestamp |
string (date-time) | no | Event time (ISO 8601). Omitted = time of the call. Must not lie in the future. |
Example call
curl -X POST "https://api.litelog.de/api/v1/incidents" \
-H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
-d '{
"property_id": 123,
"text": "Lampe im Treppenhaus, 2. OG, ist ausgefallen.",
"lat": 48.137154,
"lng": 11.576124,
"timestamp": "2026-12-01T08:15:00Z"
}'
Example response (201)
{
"data": {
"incident_id": 9001
}
}
GET /v1/incidents/{id}
Incident detail, plus linked_task_uuid (the task created from the incident, if the key can see it).
Scope: incidents:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer | yes | — |
Example call
curl "https://api.litelog.de/api/v1/incidents/9001" \
-H "X-Api-Key: $KEY"
Example response (200)
{
"data": {
"incident_id": 9001,
"uuid": "d2a7f3b1-8c4e-4b6a-9f05-6e1c3a8d7b24",
"property_id": 123,
"account_id": 5,
"text": "Lampe im Treppenhaus, 2. OG, ist ausgefallen.",
"category_id": 14,
"severity": "high",
"timestamp": "2026-12-01T08:15:00.000Z",
"lat": 48.137154,
"lng": 11.576124,
"source": "api",
"status": "acknowledged",
"acknowledged_at": "2026-12-01T08:32:10.482Z",
"closed_at": null,
"category_name": "Technischer Defekt",
"classified_by": "human",
"archived": false,
"linked_task_uuid": "a81f5c3e-7d92-4e0b-8c16-2b9d4f6e0a37"
}
}
POST /v1/incidents/{id}/acknowledge
Acknowledge an incident.
Acknowledge, close or reopen an incident (empty body). If it is already in that state, the API answers changed: false. Reopening only lifts the closing; the incident stays acknowledged. Archived incidents: 409, reason: RECORD_ARCHIVED.
Scope: incidents:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer | yes | — |
Example call
curl -X POST "https://api.litelog.de/api/v1/incidents/9001/acknowledge" \
-H "X-Api-Key: $KEY"
Example response (200)
{
"data": {
"incident_id": 9001,
"status": "acknowledged",
"status_before": "open",
"changed": true,
"acknowledged_at": "2026-12-01T08:32:10.482Z",
"closed_at": null
}
}
POST /v1/incidents/{id}/close
Close an incident.
Acknowledge, close or reopen an incident (empty body). If it is already in that state, the API answers changed: false. Reopening only lifts the closing; the incident stays acknowledged. Archived incidents: 409, reason: RECORD_ARCHIVED.
Scope: incidents:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer | yes | — |
Example call
curl -X POST "https://api.litelog.de/api/v1/incidents/9001/close" \
-H "X-Api-Key: $KEY"
Example response (200)
{
"data": {
"incident_id": 9001,
"status": "closed",
"status_before": "acknowledged",
"changed": true,
"acknowledged_at": "2026-12-01T08:32:10.482Z",
"closed_at": "2026-12-02T14:05:37.120Z"
}
}
POST /v1/incidents/{id}/reopen
Reopen a closed incident.
Acknowledge, close or reopen an incident (empty body). If it is already in that state, the API answers changed: false. Reopening only lifts the closing; the incident stays acknowledged. Archived incidents: 409, reason: RECORD_ARCHIVED.
Scope: incidents:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer | yes | — |
Example call
curl -X POST "https://api.litelog.de/api/v1/incidents/9001/reopen" \
-H "X-Api-Key: $KEY"
Example response (200)
{
"data": {
"incident_id": 9001,
"status": "acknowledged",
"status_before": "closed",
"changed": true,
"acknowledged_at": "2026-12-01T08:32:10.482Z",
"closed_at": null
}
}
PATCH /v1/incidents/{id}/classification
Set the category (category_id, null clears) and/or severity (severity). Changing a classification made by a person needs change_reason (else 422, reason: REASON_REQUIRED); if approval for incident corrections is switched on, the API answers 200 with approval_pending: true and writes only after approval.
Scope: incidents:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer | yes | — |
Body fields (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
category_id |
integer or null | no | — |
severity |
string | no | Values: low, medium, high, critical. |
change_reason |
string | no | At most 2000 characters. |
Example call
curl -X PATCH "https://api.litelog.de/api/v1/incidents/9001/classification" \
-H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
-d '{
"category_id": 14,
"severity": "high"
}'
Example response (200)
{
"changed": true,
"changes": [
{
"field": "category_id",
"before": 15,
"after": 14,
"before_name": "Sonstiges",
"after_name": "Technischer Defekt"
},
{
"field": "severity",
"before": "medium",
"after": "high"
}
],
"unchanged": [],
"data": {
"incident_id": 9001,
"uuid": "d2a7f3b1-8c4e-4b6a-9f05-6e1c3a8d7b24",
"property_id": 123,
"account_id": 5,
"text": "Lampe im Treppenhaus, 2. OG, ist ausgefallen.",
"category_id": 14,
"severity": "high",
"timestamp": "2026-12-01T08:15:00.000Z",
"lat": 48.137154,
"lng": 11.576124,
"source": "api",
"status": "acknowledged",
"acknowledged_at": "2026-12-01T08:32:10.482Z",
"closed_at": null,
"category_name": "Technischer Defekt",
"classified_by": "human",
"archived": false
}
}
POST /v1/incidents/{id}/task
Create the task for the incident (needs tasks:write; optional title, description, priority, assignee_id, due_date, due_time). One task per incident: a second call answers 200 with created: false. As with POST /v1/tasks, creating needs no change reason (initial creation), even if your company has switched on the reason requirement; a change_reason given anyway (in the body or as header X-Change-Reason) is stored in the task's settings history, otherwise the history shows "Initial creation".
Scope: tasks:write
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | integer | yes | — |
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)
| Field | Type | Required | Description |
|---|---|---|---|
title |
string | no | At most 500 characters. |
description |
string | no | At most 10000 characters. |
priority |
string | no | Values: HIGH, MEDIUM, LOW. |
assignee_id |
integer | no | — |
due_date |
string (date) | no | — |
due_time |
string | no | HH:mm; requires due_date. |
change_reason |
string | no | Optional. Creating needs no reason; when given, it is stored with the created row (alternatively header X-Change-Reason). At most 2000 characters. |
Example call
curl -X POST "https://api.litelog.de/api/v1/incidents/9001/task" \
-H "X-Api-Key: $KEY" -H "Content-Type: application/json" \
-d '{
"title": "Lampe im Treppenhaus 2. OG austauschen",
"priority": "HIGH",
"assignee_id": 42,
"due_date": "2026-12-03",
"due_time": "12:00"
}'
Example response (201)
{
"data": {
"task_uuid": "a81f5c3e-7d92-4e0b-8c16-2b9d4f6e0a37",
"task_id": 4712,
"created": true,
"title": "Lampe im Treppenhaus 2. OG austauschen",
"property_id": 123,
"incident_id": 9001
}
}
GET /v1/incident-categories
The tenant's incident categories (provides the category_id values).
Scope: incidents:read
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
include_archived |
query | boolean | no | Default: false. |
Example call
curl "https://api.litelog.de/api/v1/incident-categories" \
-H "X-Api-Key: $KEY"
Example response (200)
{
"data": [
{
"category_id": 11,
"name": "Schaden/Beschädigung",
"description": "Sichtbare Schäden an Gebäude, Inventar oder Außenanlagen — z. B. zerbrochene Scheiben, beschädigte Türen oder Möbel, Graffiti, Vandalismus, Wasserschäden.",
"is_system": true,
"archived": false
},
{
"category_id": 14,
"name": "Technischer Defekt",
"description": "Defekte oder gestörte Technik und Anlagen — z. B. ausgefallene Beleuchtung, defekte Aufzüge, Heizungs- oder Lüftungsstörungen, tropfende Armaturen.",
"is_system": true,
"archived": false
},
{
"category_id": 16,
"name": "Schlüssel und Zugang",
"description": null,
"is_system": false,
"archived": false
}
]
}
