Skip to content

API Notificări

Gestionarea setărilor de notificare prin email și Teams pentru tenant-ul autentificat.

Obținerea setărilor de notificare

GET /tenants/me/notifications

Exemplu de cerere

bash
curl https://api.aether365.io/tenants/me/notifications \
  -H "Authorization: Bearer <token>"

Exemplu de răspuns

json
{
  "success": true,
  "data": {
    "emailOnComplete": true,
    "emailOnFail": true,
    "teamsWebhookUrl": "https://outlook.office.com/webhook/...",
    "teamsOnComplete": true,
    "teamsOnFail": true
  }
}

Câmpuri răspuns

CâmpTipDescriere
emailOnCompletebooleanTrimite email când o scanare se finalizează cu succes
emailOnFailbooleanTrimite email când o scanare eșuează
teamsWebhookUrlstring sau nullURL webhook incoming Microsoft Teams
teamsOnCompletebooleanPostează în Teams când o scanare se finalizează
teamsOnFailbooleanPostează în Teams când o scanare eșuează

Actualizarea setărilor de notificare

Actualizează setările de notificare. Doar câmpurile pe care le includeți sunt modificate.

PATCH /tenants/me/notifications

Corp cerere

Toate câmpurile sunt opționale. Includeți doar câmpurile pe care doriți să le modificați.

json
{
  "emailOnComplete": true,
  "emailOnFail": true,
  "teamsWebhookUrl": "https://outlook.office.com/webhook/...",
  "teamsOnComplete": true,
  "teamsOnFail": false
}

Exemplu: Activarea notificărilor 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
  }'

Exemplu: Dezactivarea tuturor notificărilor 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
  }'

Exemplu de răspuns

json
{
  "success": true,
  "data": {
    "emailOnComplete": false,
    "emailOnFail": false,
    "teamsWebhookUrl": "https://outlook.office.com/webhook/...",
    "teamsOnComplete": true,
    "teamsOnFail": true
  }
}

Erori

CodHTTPDescriere
AUTH_INSUFFICIENT_SCOPE403Permisiuni insuficiente pentru această acțiune
VALIDATION_ERROR400Format URL webhook invalid
Ți-a fost utilă această pagină?