Incidents
Riferimento API per Incidents: ogni handler con i suoi campi e un esempio.
Ultimo aggiornamento:
incident: detail
Ottenere incidente
Restituisce un incidente tramite il suo ID, con stato, gravità, inizio, ora di risoluzione e campi personalizzati.
- Scope richiesto:
incidents:read - Endpoint:
POST /api/query
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
id |
string (uuid) | sì |
Richiesta di esempio
curl -X POST https://status.example.com/api/query \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:query:incident:detail",
"payload": {
"id": "00000000-0000-4000-8000-000000000001"
}
}'
incident: list
Elencare incidenti
Restituisce un elenco filtrato e paginato di incidenti, anche quelli risolti, con stato, gravità e inizio.
- Scope richiesto:
incidents:read - Endpoint:
POST /api/query
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
cursor |
string | no | Posizione da nextCursor della pagina precedente. |
limit |
integer | no | Righe per pagina, 50 per impostazione predefinita, al massimo 200. |
search |
string | no | Ricerca full-text nei campi ricercabili. |
sort |
string | no | Campo per cui ordinare. |
sortDirection |
“asc” | “desc” | no | asc o desc. |
offset |
integer | no | Numero di righe da saltare. Per sfogliare è meglio cursor. |
totalCount |
boolean | no | Con true ricevi anche total, il numero di righe corrispondenti. |
includeDeleted |
boolean | no | Con true sono incluse le righe eliminate. Solo per entità con eliminazione logica. |
onlyDeleted |
boolean | no | Con true vengono restituite solo le righe eliminate. Solo per entità con eliminazione logica, non insieme a includeDeleted. |
filter |
object | no | Un filtro di campo con field, op e value. op è uno tra eq, ne, lt, gt, lte, gte, in. |
filter.field |
string | sì | |
filter.op |
“eq” | “ne” | “lt” | “gt” | “lte” | “gte” | “in” | sì | |
filter.value |
any | sì | |
filters |
array of object | no | Più filtri di campo, ciascuno con field, op e value. op è uno tra eq, ne, lt, gt, lte, gte, in. |
namedFilter |
string | no | Nome di un filtro predefinito dell’entità, per esempio una coda di lavoro. |
aggregate |
object | no | Restituisce valori aggregati invece di righe. |
aggregate.groupBy |
string | no | |
aggregate.measures |
array of object | no |
Richiesta di esempio
curl -X POST https://status.example.com/api/query \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:query:incident:list",
"payload": {}
}'
Risposta di esempio
Stato: 200
{
"data": {
"rows": [
{
"id": "00000000-0000-4000-8000-000000000001",
"tenantId": "00000000-0000-4000-8000-000000000002",
"version": 3,
"insertedAt": "2026-01-15T09:30:00.000Z",
"modifiedAt": null,
"insertedById": "00000000-0000-4000-8000-000000000003",
"modifiedById": null,
"title": "Elevated API errors",
"status": "investigating",
"severity": "major",
"startedAt": "2026-01-15T09:30:00.000Z",
"resolvedAt": null,
"sourceMonitorId": null,
"customFields": {}
}
],
"nextCursor": null
}
}
incident: updates
Elencare aggiornamenti di un incidente
Restituisce la cronologia degli aggiornamenti di un incidente, ciascuno con il nome visualizzato dell’autore.
- Scope richiesto:
incidents:read - Endpoint:
POST /api/query
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
incidentId |
string (uuid) | sì | Incidente |
Richiesta di esempio
curl -X POST https://status.example.com/api/query \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:query:incident:updates",
"payload": {
"incidentId": "00000000-0000-4000-8000-000000000001"
}
}'
incident: open
Aprire incidente
Apre un nuovo incidente sulla pagina di stato, lo collega ai componenti interessati e registra il primo aggiornamento nella cronologia.
- Scope richiesto:
incidents:write - Endpoint:
POST /api/write
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
title |
string | sì | Titolo |
body |
string | sì | Descrizione |
severity |
“minor” | “major” | “critical” | no | Gravità |
componentIds |
array of string (uuid) | no | Componenti interessati |
startedAt |
string (date-time) | no | Inizio |
sourceMonitorId |
string (uuid) | no |
Richiesta di esempio
curl -X POST https://status.example.com/api/write \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:write:incident:open",
"payload": {
"title": "Elevated API errors",
"body": "We are investigating elevated error rates.",
"severity": "major",
"componentIds": [
"00000000-0000-4000-8000-000000000001"
]
}
}'
Risposta di esempio
Stato: 200
{
"isSuccess": true,
"data": {
"id": "00000000-0000-4000-8000-000000000002"
}
}
incident: post-update
Pubblicare aggiornamento di un incidente
Aggiunge un aggiornamento a un incidente aperto e, se richiesto, ne cambia lo stato nella stessa chiamata.
- Scope richiesto:
incidents:write - Endpoint:
POST /api/write
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
incidentId |
string (uuid) | sì | Incidente |
body |
string | sì | Descrizione |
newStatus |
“investigating” | “identified” | “monitoring” | “resolved” | no | Nuovo stato |
Richiesta di esempio
curl -X POST https://status.example.com/api/write \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:write:incident:post-update",
"payload": {
"incidentId": "00000000-0000-4000-8000-000000000001",
"body": "text",
"newStatus": "investigating"
}
}'
incident: resolve
Risolvere incidente
Segna un incidente aperto come risolto, registra l’ora di risoluzione e aggiunge un aggiornamento finale alla cronologia.
- Scope richiesto:
incidents:write - Endpoint:
POST /api/write
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
incidentId |
string (uuid) | sì | Incidente |
body |
string | sì | Descrizione |
Richiesta di esempio
curl -X POST https://status.example.com/api/write \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:write:incident:resolve",
"payload": {
"incidentId": "00000000-0000-4000-8000-000000000001",
"body": "text"
}
}'
incident: update
Modificare incidente
Modifica titolo, gravità, inizio e campi personalizzati di un incidente senza toccarne lo stato. Lo stato lo cambiano solo le chiamate per aprire, aggiornare e risolvere.
- Scope richiesto:
incidents:write - Endpoint:
POST /api/write
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
id |
string (uuid) | sì | |
version |
number | sì | |
changes |
object | sì | |
changes.title |
string | no | Titolo |
changes.status |
“investigating” | “identified” | “monitoring” | “resolved” | no | Stato |
changes.severity |
“minor” | “major” | “critical” | no | Gravità |
changes.startedAt |
string (date-time) | no | Inizio |
changes.resolvedAt |
string (date-time) | null | no | Risolto |
changes.sourceMonitorId |
string | null | no | |
changes.customFields |
object | no |
Richiesta di esempio
curl -X POST https://status.example.com/api/write \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"type": "publicstatus:write:incident:update",
"payload": {
"id": "00000000-0000-4000-8000-000000000001",
"version": 1,
"changes": {
"title": "text",
"status": "investigating",
"severity": "minor",
"startedAt": "2026-01-15T09:30:00.000Z",
"resolvedAt": "2026-01-15T09:30:00.000Z",
"sourceMonitorId": "text",
"customFields": {}
}
}
}'