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/notificationsExemplu 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âmp | Tip | Descriere |
|---|---|---|
emailOnComplete | boolean | Trimite email când o scanare se finalizează cu succes |
emailOnFail | boolean | Trimite email când o scanare eșuează |
teamsWebhookUrl | string sau null | URL webhook incoming Microsoft Teams |
teamsOnComplete | boolean | Postează în Teams când o scanare se finalizează |
teamsOnFail | boolean | Postează î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/notificationsCorp 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
| Cod | HTTP | Descriere |
|---|---|---|
AUTH_INSUFFICIENT_SCOPE | 403 | Permisiuni insuficiente pentru această acțiune |
VALIDATION_ERROR | 400 | Format URL webhook invalid |