This API will help you store information about cars stored in your garage (repair shop 🛠). Four HTTP endpoints are here for you to use:
Here's the HTTP request you can run. Be careful, :garage
in the URL is dynamic!
verb GET
url: https://garage.api.lewagon.com/:garage/cars # Default: JSON format
url: https://garage.api.lewagon.com/:garage/cars.xml # Variant: XML format
You may choose any name for your garage. Your buddy and you should have different garage names! Example of garage names: 'reparator-2000', 'bricolman', 'abitbol-and-son', etc.
To add a new car to your garage, you need to send this HTTP request:
verb: POST
url: https://garage.api.lewagon.com/:garage/cars
headers: Content-Type: application/json
body:
{
"brand": "PEUGEOT",
"model": "106",
"owner": "ssaunier",
"plate": "123AZ56"
}
If you know the :id
of a car, you can retrieve its information with:
verb GET
url: https://garage.api.lewagon.com/cars/:id
If you know the :id
of a car, you can remove it with:
verb: DELETE
url: https://garage.api.lewagon.com/cars/:id