Skip to content

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ı

AlanTürAçıklama
emailOnCompletebooleanTarama başarıyla tamamlandığında e-posta gönder
emailOnFailbooleanTarama başarısız olduğunda e-posta gönder
teamsWebhookUrlstring veya nullMicrosoft Teams gelen webhook URL'si
teamsOnCompletebooleanTarama tamamlandığında Teams'e mesaj gönder
teamsOnFailbooleanTarama 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

KodHTTPAçıklama
AUTH_INSUFFICIENT_SCOPE403Bu işlem için yetersiz izin
VALIDATION_ERROR400Geçersiz webhook URL formatı
Bu sayfa işinize yaradı mı?