Dirty Cars API
Une API RESTful complète pour la gestion de voitures
Fonctionnalités
- Authentification JWT
- CRUD complet
- Pagination avancée
- Filtres multiples
- Validation des données
- Documentation Swagger
- Système de notation
- Gestion des images
- Catégorisation
- Recherche optimisée
Endpoints principaux
-
/api/carsGestion des voitures -
/api/usersGestion des utilisateurs -
/api/categoriesGestion des catégories -
/api/reviewsGestion des avis -
/api/car_imagesGestion des images -
/api/login_checkAuthentification JWT
Nombres de voitures par categories :
Prestige - 51
Collection - 16
Sport - 17
Youngtimer - 16
Oldtimer - 16
GET
/api/cars/1
Exemple de réponse :
{
"@context": "/api/contexts/Car",
"@id": "/api/cars/1",
"@type": "Car",
"id": 1,
"brand": "Ferrari",
"model": "SF90 Stradale",
"description": "La Ferrari SF90 Stradale 2022 incarne l'apogée de la performance et de l'innovation chez Ferrari...",
"year": 2022,
"price": 507000,
"engineType": "V8 Hybrid",
"horsepower": 986,
"torque": 780,
"topSpeed": 340,
"acceleration": 2.5,
"fuelType": "Hybrid",
"transmission": "8-speed dual-clutch",
"drivetrain": "AWD",
"weight": 1570,
"reviews": [
{
"@id": "/api/reviews/1",
"@type": "Review",
"content": "An absolute beast on the road. Worth every penny!",
"rating": 5,
"createdAt": "2025-01-12T14:00:00+00:00"
},
{
"@id": "/api/reviews/2",
"@type": "Review",
"content": "The driving dynamics are unmatched. Truly a Ferrari.",
"rating": 5,
"createdAt": "2025-01-11T10:30:00+00:00"
}
],
"category": {
"@id": "/api/categories/1",
"@type": "Category",
"id": 1,
"name": "Prestige"
},
"images": [
{
"@id": "/api/car_images/1",
"@type": "CarImage",
"id": 1,
"url": "https://images.pexels.com/photos/26928375/pexels-photo-26928375/free-photo-of-a-red-ferrari-sf90-stradale.png"
}
]
}