API Notifiche
Maintainer: Aether365 Team Destinatari: Sviluppatori Ambito: Endpoint API per le impostazioni delle notifiche
Gestisci le impostazioni delle notifiche email e Teams per il tenant autenticato.
Ottenere le impostazioni di notifica
GET /tenants/me/notificationsRichiesta di esempio
bash
curl https://api.aether365.io/tenants/me/notifications \
-H "Authorization: Bearer <token>"Risposta di esempio
json
{
"success": true,
"data": {
"emailOnComplete": true,
"emailOnFail": true,
"teamsWebhookUrl": "https://outlook.office.com/webhook/...",
"teamsOnComplete": true,
"teamsOnFail": true
}
}Campi della risposta
| Campo | Tipo | Descrizione |
|---|---|---|
emailOnComplete | boolean | Invia email quando una scansione termina con successo |
emailOnFail | boolean | Invia email quando una scansione fallisce |
teamsWebhookUrl | string o null | URL del webhook in ingresso di Microsoft Teams |
teamsOnComplete | boolean | Pubblica su Teams al completamento di una scansione |
teamsOnFail | boolean | Pubblica su Teams in caso di errore di una scansione |
Aggiornare le impostazioni di notifica
Aggiorna le impostazioni di notifica. Vengono modificati solo i campi inclusi.
PATCH /tenants/me/notificationsCorpo della richiesta
Tutti i campi sono opzionali. Includi solo quelli che vuoi modificare.
json
{
"emailOnComplete": true,
"emailOnFail": true,
"teamsWebhookUrl": "https://outlook.office.com/webhook/...",
"teamsOnComplete": true,
"teamsOnFail": false
}Esempio: Abilitare le notifiche Teams
bash
curl -X PATCH https://api.aether365.io/tenants/me/notifications \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"teamsWebhookUrl": "https://outlook.office.com/webhook/your-webhook-url",
"teamsOnComplete": true,
"teamsOnFail": true
}'Esempio: Disabilitare tutte le notifiche email
bash
curl -X PATCH https://api.aether365.io/tenants/me/notifications \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"emailOnComplete": false,
"emailOnFail": false
}'Risposta di esempio
json
{
"success": true,
"data": {
"emailOnComplete": false,
"emailOnFail": false,
"teamsWebhookUrl": "https://outlook.office.com/webhook/...",
"teamsOnComplete": true,
"teamsOnFail": true
}
}Errori
| Codice | HTTP | Descrizione |
|---|---|---|
AUTH_INSUFFICIENT_SCOPE | 403 | Permessi insufficienti per questa azione |
VALIDATION_ERROR | 400 | Formato URL del webhook non valido |