Bildirimler API
Hazırlayan: Aether365 Ekibi Hedef Kitle: Geliştiriciler Kapsam: Bildirim ayarları API endpoint'leri
Kimlik doğrulanmış tenant için e-posta ve Teams bildirim ayarlarını yönetin.
Bildirim Ayarlarını Alma
GET /tenants/me/notificationsÖrnek İstek
bash
curl https://api.aether365.io/tenants/me/notifications \
-H "Authorization: Bearer <token>"Örnek Yanıt
json
{
"success": true,
"data": {
"emailOnComplete": true,
"emailOnFail": true,
"teamsWebhookUrl": "https://outlook.office.com/webhook/...",
"teamsOnComplete": true,
"teamsOnFail": true
}
}Yanıt Alanları
| Alan | Tür | Açıklama |
|---|---|---|
emailOnComplete | boolean | Tarama başarıyla tamamlandığında e-posta gönder |
emailOnFail | boolean | Tarama başarısız olduğunda e-posta gönder |
teamsWebhookUrl | string veya null | Microsoft Teams gelen webhook URL'si |
teamsOnComplete | boolean | Tarama tamamlandığında Teams'e mesaj gönder |
teamsOnFail | boolean | Tarama başarısız olduğunda Teams'e mesaj gönder |
Bildirim Ayarlarını Güncelleme
Bildirim ayarlarını günceller. Yalnızca gönderdiğiniz alanlar değiştirilir.
PATCH /tenants/me/notificationsİstek Gövdesi
Tüm alanlar isteğe bağlıdır. Yalnızca değiştirmek istediğiniz alanları gönderin.
json
{
"emailOnComplete": true,
"emailOnFail": true,
"teamsWebhookUrl": "https://outlook.office.com/webhook/...",
"teamsOnComplete": true,
"teamsOnFail": false
}Örnek: Teams bildirimlerini etkinleştirme
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
}'Örnek: Tüm e-posta bildirimlerini devre dışı bırakma
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
}'Örnek Yanıt
json
{
"success": true,
"data": {
"emailOnComplete": false,
"emailOnFail": false,
"teamsWebhookUrl": "https://outlook.office.com/webhook/...",
"teamsOnComplete": true,
"teamsOnFail": true
}
}Hatalar
| Kod | HTTP | Açıklama |
|---|---|---|
AUTH_INSUFFICIENT_SCOPE | 403 | Bu işlem için yetersiz izin |
VALIDATION_ERROR | 400 | Geçersiz webhook URL formatı |