ConformVault
API Partage
Endpoints partage et administration
Endpoints partage et administration
Book: ConformVault — Stockage sécurisé de fichiers | Chapter: Reference API
Endpoints partage et administration
Liens de partage (Share Links)
Routes publiques (sans authentification)
| Methode | Endpoint | Description |
|---|---|---|
| GET | /s/:token | Informations du lien de partage |
| GET | /s/:token/consent-text | Texte de consentement Loi 25 |
| POST | /s/:token/accept-consent | Accepter le consentement |
| GET | /s/:token/encryption-info | Informations de chiffrement |
| GET | /s/:token/download | Telecharger le fichier |
| POST | /s/:token/upload | Uploader un fichier (25MB max) |
| GET | /s/:token/files | Lister les fichiers du lien |
| GET | /s/:token/files/:fileId | Metadonnees d'un fichier |
Routes protegees (authentification requise)
Les share links sont geres sous /api/v1/clients/:client_id/share-links.
| Methode | Endpoint | Description |
|---|---|---|
| GET | .../share-links | Liste des liens (avec creator info) |
| POST | .../share-links | Creer un lien |
| GET | .../share-links/:id | Detail d'un lien |
| DELETE | .../share-links/:id | Supprimer un lien |
| POST | .../share-links/:id/toggle | Activer/desactiver |
| GET | .../share-links/:id/stats | Statistiques |
Creation d'un lien de partage
{
"name": "Documents pour client",
"resource_type": "file",
"resource_id": "uuid",
"allow_upload": false,
"password": "optionalPassword",
"expires_at": "2026-03-01T00:00:00Z",
"max_downloads": 10
}Reponse :
{
"id": "uuid",
"token": "abc123...long-hex-token",
"url": "https://conformvault.secuaas.dev/s/abc123...",
"created_at": "2026-02-14T00:00:00Z"
}Audit trail des share links
Chaque action sur un share link est tracee dans l'audit trail :
share_link_access: Acces au lien (consultation)share_link_download: Telechargement d'un fichiershare_link_upload: Upload d'un fichierconsent_accepted: Acceptation du consentement Loi 25
Administration
Endpoints admin (superadmin/msp uniquement)
| Methode | Endpoint | Description |
|---|---|---|
| GET | /api/v1/admin/storage/stats | Statistiques de stockage S3 |
| GET | /api/v1/admin/audit-logs | Logs d'audit |
| GET | /api/v1/admin/config | Configuration systeme |
| PUT | /api/v1/admin/config | Modifier la configuration |
Configuration Stripe (superadmin)
| Methode | Endpoint | Description |
|---|---|---|
| GET | /api/v1/stripe-config | Configuration Stripe |
| PUT | /api/v1/stripe-config | Modifier |
| POST | /api/v1/stripe-config/switch-mode | Basculer dev/prod |
| GET | /api/v1/stripe-config/audit-logs | Logs d'audit Stripe |
Configuration plateforme (superadmin)
| Methode | Endpoint | Description |
|---|---|---|
| GET | /api/v1/platform-config | Configuration globale |
| PUT | /api/v1/platform-config | Modifier |
| PUT | /api/v1/platform-config/mode | Basculer mode dev/prod |
Metriques et monitoring
| Methode | Endpoint | Description |
|---|---|---|
| GET | /health | Liveness probe (200 OK) |
| GET | /ready | Readiness probe (DB + Redis) |
| GET | /metrics | Metriques Prometheus |
Metriques Prometheus disponibles
http_requests_total: Nombre de requetes HTTP (par method, path, status)http_request_duration_seconds: Duree des requetes HTTP (histogramme)s3_operations_total: Nombre d'operations S3 (par operation, status)s3_operation_duration_seconds: Duree des operations S3active_goroutines: Nombre de goroutines activeslogin_attempts_total: Tentatives de connexion (par status)file_uploads_total: Nombre de fichiers uploades