Webhooks
Riferimento API per Webhooks: ogni handler con i suoi campi e un esempio.
Ultimo aggiornamento:
webhook-subscriber: detail
Ottenere webhook
Restituisce un webhook tramite il suo ID, con URL, selezione degli eventi ed errori di consegna. Il secret di firma non viene mai restituito.
- Scope richiesto:
webhooks: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:webhook-subscriber:detail",
"payload": {
"id": "00000000-0000-4000-8000-000000000001"
}
}'
webhook-subscriber: list
Elencare webhook
Restituisce un elenco filtrato e paginato di webhook, con URL, selezione degli eventi, stato attivo ed errori di consegna. Il secret di firma non viene mai restituito.
- Scope richiesto:
webhooks: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:webhook-subscriber:list",
"payload": {}
}'
Risposta di esempio
Stato: 200
{
"data": {
"nextCursor": null,
"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,
"url": "https://93.184.216.34/hook",
"description": null,
"events": [
"incident.created"
],
"active": true,
"failureCount": 0,
"lastDeliveryAt": null,
"lastFailureAt": null,
"lastFailureReason": null
}
]
}
}
webhook-subscriber: create
Creare webhook
Registra un indirizzo HTTPS che riceve eventi webhook firmati e restituisce una sola volta il suo secret di firma.
- Scope richiesto:
webhooks:write - Endpoint:
POST /api/write
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
url |
string (uri) | sì | URL |
description |
string | no | Nome |
events |
array of “incident.created” | “incident.updated” | “incident.resolved” | “component.updated” | “maintenance.scheduled” | “maintenance.started” | “maintenance.completed” | “maintenance.cancelled” | no | Eventi |
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:webhook-subscriber:create",
"payload": {
"url": "https://93.184.216.34/hook",
"events": [
"incident.created"
]
}
}'
Risposta di esempio
Stato: 200
{
"isSuccess": true,
"data": {
"id": "00000000-0000-4000-8000-000000000001",
"secret": "REDACTED"
}
}
webhook-subscriber: delete
Eliminare webhook
Elimina definitivamente un webhook, così il suo indirizzo non riceve più eventi.
- Scope richiesto:
webhooks:write - Endpoint:
POST /api/write
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
id |
string (uuid) | sì |
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:webhook-subscriber:delete",
"payload": {
"id": "00000000-0000-4000-8000-000000000001"
}
}'
webhook-subscriber: reactivate
Riattivare webhook
Riattiva un webhook disattivato e azzera il suo contatore di errori.
- Scope richiesto:
webhooks:write - Endpoint:
POST /api/write
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
id |
string (uuid) | sì |
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:webhook-subscriber:reactivate",
"payload": {
"id": "00000000-0000-4000-8000-000000000001"
}
}'
webhook-subscriber: rotate-secret
Rinnovare il secret di un webhook
Sostituisce il secret di firma di un webhook e restituisce una sola volta il nuovo secret. Il vecchio smette di valere subito.
- Scope richiesto:
webhooks:write - Endpoint:
POST /api/write
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
id |
string (uuid) | sì | |
version |
number | 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:webhook-subscriber:rotate-secret",
"payload": {
"id": "00000000-0000-4000-8000-000000000001",
"version": 1
}
}'
webhook-subscriber: update
Modificare webhook
Modifica l’URL, la descrizione o la selezione degli eventi di un webhook.
- Scope richiesto:
webhooks:write - Endpoint:
POST /api/write
| Campo | Tipo | Obbligatorio | Descrizione |
|---|---|---|---|
id |
string (uuid) | sì | |
version |
number | sì | |
changes |
object | sì | |
changes.url |
string (uri) | no | URL |
changes.description |
string | null | no | Nome |
changes.events |
array of “incident.created” | “incident.updated” | “incident.resolved” | “component.updated” | “maintenance.scheduled” | “maintenance.started” | “maintenance.completed” | “maintenance.cancelled” | no | Eventi |
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:webhook-subscriber:update",
"payload": {
"id": "00000000-0000-4000-8000-000000000001",
"version": 1,
"changes": {
"url": "https://example.com",
"description": "text",
"events": [
"incident.created"
]
}
}
}'