Skip to content

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/notifications

Richiesta 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

CampoTipoDescrizione
emailOnCompletebooleanInvia email quando una scansione termina con successo
emailOnFailbooleanInvia email quando una scansione fallisce
teamsWebhookUrlstring o nullURL del webhook in ingresso di Microsoft Teams
teamsOnCompletebooleanPubblica su Teams al completamento di una scansione
teamsOnFailbooleanPubblica 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/notifications

Corpo 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

CodiceHTTPDescrizione
AUTH_INSUFFICIENT_SCOPE403Permessi insufficienti per questa azione
VALIDATION_ERROR400Formato URL del webhook non valido
Questa pagina ti è stata utile?