API REST
Sections
API REST
API REST
AltiusOne expose une API REST complète basée sur Django REST Framework, documentée avec OpenAPI (drf-spectacular).
Authentification
L'API utilise JWT (JSON Web Tokens) via SimpleJWT :
# Obtenir un token
curl -X POST /api/token/ \
-d '{"username": "user", "password": "pass"}'
# Utiliser le token
curl -H "Authorization: Bearer <access_token>" \
/api/v1/comptabilite/ecritures/
Endpoints principaux
| Module | Endpoint | Opérations |
|---|---|---|
| Comptabilité | /api/v1/comptabilite/ |
CRUD écritures, comptes |
| Facturation | /api/v1/facturation/ |
CRUD factures, devis |
| TVA | /api/v1/tva/ |
Décomptes TVA |
| Salaires | /api/v1/salaires/ |
Fiches, certificats |
| Documents | /api/v1/documents/ |
Upload, recherche |
| Projets | /api/v1/projets/ |
Projets, tâches |
| Graphe | /api/v1/graph-*/ |
Entités, relations |
Documentation OpenAPI
- Swagger UI —
/api/docs/ - ReDoc —
/api/redoc/ - Schéma OpenAPI —
/api/schema/
OAuth2 / OIDC
AltiusOne est aussi un provider OAuth2/OIDC, ce qui permet :
- SSO avec Nextcloud via
user_oidc - Intégration avec des applications tierces
- Authentification mobile (app React Native)
Interactions
- Mobile — L'app React Native consomme l'API REST
- Nextcloud — SSO via le provider OIDC
- MCP — Le serveur MCP utilise l'API interne
- Import/Export — Les imports peuvent être effectués via l'API