API – Mini Symfony Runtime
Cette API expose des endpoints REST sécurisés avec JWT.
Endpoints publics
Authentification
Obtenir un token JWT :
curl -X POST http://localhost:8080/api/login_check \
-H "Content-Type: application/json" \
-d '{"email":"test@test.com","password":"password"}'
Réponse :
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Endpoints sécurisés
Utiliser le token :
curl http://localhost:8080/api/messages \
-H "Authorization: Bearer TOKEN"
Exemples
Pagination
GET /api/messages?page=1&limit=10
Recherche
GET /api/messages?q=greg