Skip to content

Notifikationer API

Administrer e-mail- og Teams-notifikationsindstillinger for den autentificerede tenant.

Hent notifikationsindstillinger

GET /tenants/me/notifications

Eksempel 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

FeltTypeBeskrivelse
emailOnCompletebooleanSend e-mail, når en scanning gennemføres succesfuldt
emailOnFailbooleanSend e-mail, når en scanning fejler
teamsWebhookUrlstring eller nullMicrosoft Teams indgående webhook-URL
teamsOnCompletebooleanSend til Teams, når en scanning gennemføres
teamsOnFailbooleanSend til Teams, når en scanning fejler

Opdater notifikationsindstillinger

Opdaterer notifikationsindstillinger. Kun de felter, du inkluderer, ændres.

PATCH /tenants/me/notifications

Forespø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

KodeHTTPBeskrivelse
AUTH_INSUFFICIENT_SCOPE403Utilstrækkelige tilladelser til denne handling
VALIDATION_ERROR400Ugyldigt webhook-URL-format
Var denne side nyttig?