RLA API v1 — Marchés Tunisie Telecom Zone Sud
API REST + tableau de bord pour la gestion des marchés publics Tunisie Telecom Zone Sud.
URL production : https://rla.bolbol.tn
Architecture
Endpoints API
Public
| Méthode |
Endpoint |
Description |
| GET |
/api/health |
Santé du service |
| POST |
/api/auth/login |
Authentification → JWT |
Données (auth requise)
| Méthode |
Endpoint |
Description |
| GET |
/api/synthese |
KPIs globaux + alertes + pilotage |
| GET |
/api/alertes |
Marchés avec alertes délai (≤90j) |
| GET |
/api/en-service |
Marchés actifs en service |
| GET |
/api/en-cours |
Marchés en cours (taux_phy < 100%) |
| GET |
/api/par-region |
Agrégation par région |
| GET |
/api/clotures |
Marchés clôturés |
| GET |
/api/pilotage-proactif |
Niveaux avancement (normal/sous/dépassé) |
| GET |
/api/matrice-risque |
Matrice risque 3×3 (délai × avancement) |
| GET |
/api/marches |
Liste complète marchés |
| GET |
/api/marches/:id |
Détail marché |
| GET |
/api/stats |
Statistiques (compat. ancien front) |
Exports (auth requise)
| Méthode |
Endpoint |
Rôle min. |
Description |
| GET |
/api/export/pdf?view=<vue> |
user |
PDF par vue |
| GET |
/api/export/xlsx?view=<vue> |
superadmin |
Excel |
| GET |
/api/export/pptx?view=<vue> |
superadmin |
PowerPoint |
| GET |
/api/export/docx?view=<vue> |
superadmin |
Word |
Vues disponibles : synthese, alertes, en-service, en-cours, par-region, clotures, pilotage, matrice-risque
Admin (superadmin)
| Méthode |
Endpoint |
Description |
| GET |
/api/users |
Liste utilisateurs |
| POST |
/api/users |
Créer utilisateur |
| DELETE |
/api/users/:id |
Supprimer utilisateur |
| GET |
/api/logs |
Logs connexion |
| GET |
/api/pipeline |
Pipeline AO (admin+) |
Paramètres de filtres
Tous les endpoints données acceptent :
| Paramètre |
Type |
Exemple |
region |
string |
?region=Sfax |
entrepreneur |
string |
?entrepreneur=Ent%20X |
projet |
string |
?projet=4G |
nature |
string |
?nature=CAPEX |
statut |
string |
?statut=en+cours |
niveau |
string |
?niveau=critique (alertes) |
Variables d'environnement
| Variable |
Requis |
Description |
JWT_SECRET |
✓ |
Clé secrète JWT |
BASEROW_API_URL |
✓ |
URL Baserow (https://baserow.bolbol.tn/api/) |
BASEROW_TOKEN |
✓ |
Token d'accès Baserow |
BASEROW_TABLE_MARCHES |
✓ |
ID table marchés (ex: 856) |
BASEROW_TABLE_PIPELINE |
✓ |
ID table pipeline (ex: 872) |
PORT |
— |
Port serveur (défaut: 3001) |
USERS |
— |
JSON utilisateurs (init si data/users.json absent) |
SEUIL_STANDARD |
— |
Seuil avancement normal (défaut: 70) |
SEUIL_CRITIQUE_PCT |
— |
Seuil avancement critique (défaut: 90) |
DELAI_CRITIQUE |
— |
Jours alerte critique (défaut: 45) |
DELAI_ATTENTION |
— |
Jours alerte attention (défaut: 90) |
Rôles
| Rôle |
PDF |
PPTX/XLSX/DOCX |
Pipeline |
Users |
Logs |
| user |
✓ |
✗ |
✗ |
✗ |
✗ |
| admin |
✓ |
✗ |
✓ |
✗ |
✗ |
| superadmin |
✓ |
✓ |
✓ |
✓ |
✓ |
Démarrage
Structure des fichiers