Incidentes
GET /incidents
Lista incidentes do tenant, ordenados por createdAt desc. Paginação por cursor (cursor, limit default 25/máx. 100).
POST /incidents
Registar incidente.
Body:
{
"title": "Acesso indevido a servidor de ficheiros",
"description": "...",
"type": "UNAUTHORIZED_ACCESS",
"severity": "HIGH",
"detectedAt": "2026-03-25T08:30:00Z"
}
type aceita: DATA_BREACH | RANSOMWARE | PHISHING | DDoS | INSIDER_THREAT | MALWARE | UNAUTHORIZED_ACCESS | PHYSICAL | WORKPLACE_ACCIDENT | OTHER.
severity aceita: LOW | MEDIUM | HIGH | CRITICAL.
Quando type = WORKPLACE_ACCIDENT (módulo SST), aceita campos adicionais opcionais: accidentLocation, injuryDescription, accidentCause, witnesses, catNumber, lostWorkDays.
Nota: o EterShield calcula automaticamente os deadlines CNCS (24h) e CNPD (72h) e os prazos NIS2 a partir de detectedAt.
GET /incidents/:id
Detalhe de um incidente. Devolve id, title, type, severity, status, description, detectedAt, resolvedAt, notifiedCNCS, notifiedCNPD, createdAt, updatedAt.
PATCH /incidents/:id
Atualizar um incidente. Body: { "status": "...", "notes": "..." }.
Nota de integração: o campo notes do body é gravado internamente no campo rootCause do incidente; a resposta devolve { id, title, status, rootCause, updatedAt }.
DELETE /incidents/:id
Elimina o incidente.