Notifikationer API
Administrer e-mail- og Teams-notifikationsindstillinger for den autentificerede tenant.
Hent notifikationsindstillinger
GET /tenants/me/notificationsEksempel på forespørgsel
bash
curl https://api.aether365.io/tenants/me/notifications \
-H "Authorization: Bearer <token>"Eksempel på svar
json
{
"success": true,
"data": {
"emailOnComplete": true,
"emailOnFail": true,
"teamsWebhookUrl": "https://outlook.office.com/webhook/...",
"teamsOnComplete": true,
"teamsOnFail": true
}
}Svarfelter
| Felt | Type | Beskrivelse |
|---|---|---|
emailOnComplete | boolean | Send e-mail, når en scanning gennemføres succesfuldt |
emailOnFail | boolean | Send e-mail, når en scanning fejler |
teamsWebhookUrl | string eller null | Microsoft Teams indgående webhook-URL |
teamsOnComplete | boolean | Send til Teams, når en scanning gennemføres |
teamsOnFail | boolean | Send til Teams, når en scanning fejler |
Opdater notifikationsindstillinger
Opdaterer notifikationsindstillinger. Kun de felter, du inkluderer, ændres.
PATCH /tenants/me/notificationsForespørgselsindhold
Alle felter er valgfrie. Inkluder kun de felter, du vil ændre.
json
{
"emailOnComplete": true,
"emailOnFail": true,
"teamsWebhookUrl": "https://outlook.office.com/webhook/...",
"teamsOnComplete": true,
"teamsOnFail": false
}Eksempel: Aktiver Teams-notifikationer
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
}'Eksempel: Deaktiver alle e-mailnotifikationer
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
}'Eksempel på svar
json
{
"success": true,
"data": {
"emailOnComplete": false,
"emailOnFail": false,
"teamsWebhookUrl": "https://outlook.office.com/webhook/...",
"teamsOnComplete": true,
"teamsOnFail": true
}
}Fejl
| Kode | HTTP | Beskrivelse |
|---|---|---|
AUTH_INSUFFICIENT_SCOPE | 403 | Utilstrækkelige tilladelser til denne handling |
VALIDATION_ERROR | 400 | Ugyldigt webhook-URL-format |