Skip to content

API — Monitoring & Réseau


Monitoring

GET /api/v1/monitoring/overview

Vue d'ensemble temps réel (JWT requis).

bash
curl -H "Authorization: Bearer $JWT" \
  https://api-rgz.duckdns.org/api/v1/monitoring/overview

Réponse 200:

json
{
  "sessions_active": 127,
  "uptime_pct": 99.8,
  "alerts_active": 2,
  "sla_pct": 99.5
}

GET /api/v1/monitoring/status

Page statut publique (pas d'auth).

bash
curl https://api-rgz.duckdns.org/api/v1/monitoring/status

GET /api/v1/alerts

Liste des alertes actives.

bash
curl -H "Authorization: Bearer $JWT" \
  "https://api-rgz.duckdns.org/api/v1/alerts?status=active"

Réponse 200:

json
{
  "items": [
    {
      "id": "uuid",
      "type": "SLA_DEGRADED",
      "severity": "P1",
      "site": "access_kossou",
      "ts": "2026-02-21T10:00:00Z",
      "acked": false
    }
  ],
  "total": 2
}

PUT /api/v1/alerts/{id}/ack

Acquitter une alerte.

bash
curl -X PUT -H "Authorization: Bearer $JWT" \
  https://api-rgz.duckdns.org/api/v1/alerts/{id}/ack \
  -d '{"user_id": "uuid"}'

GET /api/v1/canary/status

État du système canary (#80).

bash
curl -H "Authorization: Bearer $JWT" \
  https://api-rgz.duckdns.org/api/v1/canary/status

Réponse 200:

json
{
  "last_run": "2026-02-21T10:25:00Z",
  "consecutive_fails": 0,
  "overall_status": "healthy",
  "tests": [
    {"name": "dns_sinkhole", "success": true, "latency_ms": 8},
    {"name": "api_health", "success": true, "latency_ms": 45},
    {"name": "radius_auth", "success": true, "latency_ms": 120},
    {"name": "portal_access", "success": true, "latency_ms": 340},
    {"name": "data_transfer", "success": true, "latency_ms": 5200}
  ]
}

Réseau & VLAN

POST /api/v1/network/vlan/allocate

Allouer un VLAN à un nouveau revendeur.

bash
curl -X POST -H "Authorization: Bearer $ADMIN_JWT" \
  https://api-rgz.duckdns.org/api/v1/network/vlan/allocate \
  -d '{"reseller_id": "uuid"}'

Réponse 201:

json
{
  "vlan_id": 142,
  "subnet": "10.142.0.0/24",
  "nas_id": "access_kossou",
  "ssid": "ACCESS Kossou"
}

GET /api/v1/branding/

Branding d'un hotspot (public, utilisé par le portail captif).

bash
curl https://api-rgz.duckdns.org/api/v1/branding/access_kossou

Réponse 200:

json
{
  "nas_id": "access_kossou",
  "reseller_name": "Kossou",
  "logo_url": "https://...",
  "primary_color": "#f5c445"
}

Dernière mise à jour: 2026-02-21

PROJET MOSAÏQUE — 81 outils, 22 conteneurs, 500+ revendeurs WiFi Zone