Skip to content

API de Notifications

Mantenido por: Aether365 Team Audiencia: Desarrolladores Alcance: Endpoints de la API de configuración de notificaciones

Gestiona la configuración de notificaciones por correo electrónico y Teams del tenant autenticado.

Obtener configuración de notificaciones

GET /tenants/me/notifications

Solicitud de ejemplo

bash
curl https://api.aether365.io/tenants/me/notifications \
  -H "Authorization: Bearer <token>"

Respuesta de ejemplo

json
{
  "success": true,
  "data": {
    "emailOnComplete": true,
    "emailOnFail": true,
    "teamsWebhookUrl": "https://outlook.office.com/webhook/...",
    "teamsOnComplete": true,
    "teamsOnFail": true
  }
}

Campos de respuesta

CampoTipoDescripción
emailOnCompletebooleanEnviar correo cuando un análisis se complete correctamente
emailOnFailbooleanEnviar correo cuando un análisis falle
teamsWebhookUrlstring o nullURL del webhook entrante de Microsoft Teams
teamsOnCompletebooleanPublicar en Teams cuando un análisis se complete
teamsOnFailbooleanPublicar en Teams cuando un análisis falle

Actualizar configuración de notificaciones

Actualiza la configuración de notificaciones. Solo se modifican los campos que incluyas.

PATCH /tenants/me/notifications

Cuerpo de la solicitud

Todos los campos son opcionales. Incluye solo los campos que quieras cambiar.

json
{
  "emailOnComplete": true,
  "emailOnFail": true,
  "teamsWebhookUrl": "https://outlook.office.com/webhook/...",
  "teamsOnComplete": true,
  "teamsOnFail": false
}

Ejemplo: Habilitar notificaciones de 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
  }'

Ejemplo: Deshabilitar todas las notificaciones por correo

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
  }'

Respuesta de ejemplo

json
{
  "success": true,
  "data": {
    "emailOnComplete": false,
    "emailOnFail": false,
    "teamsWebhookUrl": "https://outlook.office.com/webhook/...",
    "teamsOnComplete": true,
    "teamsOnFail": true
  }
}

Errores

CódigoHTTPDescripción
AUTH_INSUFFICIENT_SCOPE403Permisos insuficientes para esta acción
VALIDATION_ERROR400Formato de URL de webhook no válido
¿Te resultó útil esta página?