Components
API-Referenz für Components: jeder Handler mit seinen Feldern und einem Beispiel.
Stand:
component: detail
Komponente abrufen
Liefert eine einzelne Komponente per ID mit Status, übergeordneter Komponente, Reihenfolge und eigenen Feldern.
- Benötigter Scope:
components:read - Endpunkt:
POST /api/query
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
id |
string (uuid) | ja |
Beispielanfrage
curl -X POST https://status.example.com/api/query \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:query:component:detail",
"payload": {
"id": "00000000-0000-4000-8000-000000000001"
}
}'
component: list
Komponenten auflisten
Liefert eine gefilterte, seitenweise Liste der Komponenten, auch ausgeblendete, mit Status und Gruppierung.
- Benötigter Scope:
components:read - Endpunkt:
POST /api/query
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
cursor |
string | nein | Position aus nextCursor der vorherigen Seite. |
limit |
integer | nein | Zeilen pro Seite, standardmäßig 50, höchstens 200. |
search |
string | nein | Volltextsuche über die durchsuchbaren Felder. |
sort |
string | nein | Feld, nach dem sortiert wird. |
sortDirection |
“asc” | “desc” | nein | asc oder desc. |
offset |
integer | nein | Anzahl der zu überspringenden Zeilen. Nutze besser cursor zum Blättern. |
totalCount |
boolean | nein | Mit true bekommst du zusätzlich total, die Anzahl der passenden Zeilen. |
includeDeleted |
boolean | nein | Mit true sind gelöschte Zeilen enthalten. Nur für Entitäten mit Soft Delete. |
onlyDeleted |
boolean | nein | Mit true kommen nur gelöschte Zeilen zurück. Nur für Entitäten mit Soft Delete, nicht zusammen mit includeDeleted. |
filter |
object | nein | Ein Feldfilter mit field, op und value. op ist einer von eq, ne, lt, gt, lte, gte, in. |
filter.field |
string | ja | |
filter.op |
“eq” | “ne” | “lt” | “gt” | “lte” | “gte” | “in” | ja | |
filter.value |
any | ja | |
filters |
array of object | nein | Mehrere Feldfilter, je mit field, op und value. op ist einer von eq, ne, lt, gt, lte, gte, in. |
namedFilter |
string | nein | Name eines vordefinierten Filters der Entität, zum Beispiel einer Arbeitsliste. |
aggregate |
object | nein | Liefert aggregierte Werte statt Zeilen. |
aggregate.groupBy |
string | nein | |
aggregate.measures |
array of object | nein |
Beispielanfrage
curl -X POST https://status.example.com/api/query \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:query:component:list",
"payload": {}
}'
Beispielantwort
Status: 200
{
"data": {
"rows": [
{
"id": "00000000-0000-4000-8000-000000000001",
"tenantId": "00000000-0000-4000-8000-000000000002",
"version": 1,
"insertedAt": "2026-01-15T09:30:00.000Z",
"modifiedAt": null,
"insertedById": "00000000-0000-4000-8000-000000000003",
"modifiedById": null,
"name": "API",
"description": null,
"status": "operational",
"parentComponentId": null,
"displayOrder": 0,
"showOnPage": true,
"customFields": {}
}
],
"nextCursor": null
}
}
component: create
Komponente anlegen
Legt eine neue Komponente der Statusseite an, die mit eigenem Betriebsstatus aufgeführt wird.
- Benötigter Scope:
components:write - Endpunkt:
POST /api/write
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
name |
string | ja | Name |
description |
string | nein | Beschreibung |
status |
“operational” | “degraded-performance” | “partial-outage” | “major-outage” | “under-maintenance” | nein | Status |
parentComponentId |
string | nein | Übergeordnete Komponente |
displayOrder |
integer | nein | Reihenfolge |
showOnPage |
boolean | nein | Öffentlich |
customFields |
object | nein |
Beispielanfrage
curl -X POST https://status.example.com/api/write \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:write:component:create",
"payload": {
"name": "API"
}
}'
Beispielantwort
Status: 200
{
"isSuccess": true,
"data": {
"kind": "save",
"id": "00000000-0000-4000-8000-000000000001",
"data": {
"id": "00000000-0000-4000-8000-000000000001",
"tenantId": "00000000-0000-4000-8000-000000000002",
"version": 1,
"insertedAt": "2026-01-15T09:30:00.000Z",
"modifiedAt": null,
"insertedById": "00000000-0000-4000-8000-000000000003",
"modifiedById": null,
"name": "API",
"description": null,
"status": "operational",
"parentComponentId": null,
"displayOrder": 0,
"showOnPage": true,
"customFields": {}
},
"changes": {
"name": "API",
"status": "operational",
"displayOrder": 0,
"showOnPage": true
},
"previous": {},
"isNew": true,
"entityName": "component"
}
}
component: delete
Komponente löschen
Löscht eine Komponente endgültig. Verknüpfungen aus früheren Vorfällen und Wartungen verweisen dann auf eine nicht mehr vorhandene Komponente.
- Benötigter Scope:
components:write - Endpunkt:
POST /api/write
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
id |
string (uuid) | ja |
Beispielanfrage
curl -X POST https://status.example.com/api/write \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:write:component:delete",
"payload": {
"id": "00000000-0000-4000-8000-000000000001"
}
}'
component: update
Komponente ändern
Ändert die Felder einer Komponente, auch den Betriebsstatus, den Besucher sehen.
- Benötigter Scope:
components:write - Endpunkt:
POST /api/write
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
id |
string (uuid) | ja | |
version |
number | ja | |
changes |
object | ja | |
changes.name |
string | nein | Name |
changes.description |
string | null | nein | Beschreibung |
changes.status |
“operational” | “degraded-performance” | “partial-outage” | “major-outage” | “under-maintenance” | nein | Status |
changes.parentComponentId |
string | null | nein | Übergeordnete Komponente |
changes.displayOrder |
integer | nein | Reihenfolge |
changes.showOnPage |
boolean | nein | Öffentlich |
changes.customFields |
object | nein |
Beispielanfrage
curl -X POST https://status.example.com/api/write \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:write:component:update",
"payload": {
"id": "00000000-0000-4000-8000-000000000001",
"version": 1,
"changes": {
"name": "text",
"description": "text",
"status": "operational",
"parentComponentId": "text",
"displayOrder": 1,
"showOnPage": true,
"customFields": {}
}
}
}'