Webhook
Come funziona
Quando scatta un evento di Incident, isthisthing.online invia una richiesta POST con corpo JSON all’URL che configuri. Se fornisci un signing secret, ogni richiesta include un header di firma HMAC-SHA256 così puoi verificarne l’autenticità.
1. Prepara il tuo endpoint
Il server deve esporre un endpoint HTTP che:
- Accetti
POSTconContent-Type: application/json. - Risponda con
2xxentro 10 secondi (altrimenti la consegna viene ripetuta).
2. Aggiungi l’integrazione
- Vai su Integrations → New Integration.
- Seleziona Webhook.
- Compila i campi:
| Field | Value |
|---|---|
| Name | Ad es. Production Webhook |
| Webhook URL | Il tuo endpoint, ad es. https://api.example.com/hooks/incidents |
| Signing Secret | Opzionale. Se impostato, ogni richiesta include X-isthisthing.online-Signature. |
- Abilita gli eventi di attivazione e fai clic su Save.
3. Verifica la firma (consigliato)
Se hai impostato un signing secret, valida ogni richiesta in arrivo:
const crypto = require('crypto');
function verify(body, secret, headerValue) {
const expected = 'sha256=' +
crypto.createHmac('sha256', secret).update(body).digest('hex');
return crypto.timingSafeEqual(
Buffer.from(expected),
Buffer.from(headerValue)
);
}
Schema del payload
{
"incidentId": "clx...",
"eventType": "incident.created",
"title": "API latency spike",
"description": "p99 latency above 2 s for 5 minutes",
"status": "OPEN",
"source": "MONITOR",
"monitorId": "clx...",
"monitorName": "Production API",
"monitorUrl": "https://api.example.com/health",
"startedAt": "2026-04-08T12:00:00.000Z",
"resolvedAt": null,
"emittedAt": "2026-04-08T12:00:01.234Z",
"workspaceId": "clx...",
"workspaceName": "Acme Corp",
"workspaceSlug": "acme",
"incidentUrl": "https://app.isthisthing.online/en/acme/incidents/clx...",
"workspaceUrl": "https://app.isthisthing.online/en/acme/dashboard"
}
Politica di retry
| Attempt | Delay |
|---|---|
| 1st retry | 30 seconds |
| 2nd retry | 2 minutes |
| 3rd retry | 10 minutes |
Dopo 3 tentativi falliti l’evento passa in dead letter e non viene più ripetuto.
Sicurezza
- Verifica sempre l’header
X-isthisthing.online-Signature. - Usa solo endpoint HTTPS.
- Ruota il signing secret se è compromesso.