-
Notifications
You must be signed in to change notification settings - Fork 0
David Fernandez edited this page Sep 9, 2013
·
5 revisions
This is the cars API. It provides ways to search and get cars. Cars are simple json objects with these fields:
| Name | Description |
|---|---|
| brand | the brand of the car |
| model | the model of the car |
| horsepower | the horse power of the car |
| year | the year of the car |
{
"car": {
"brand": "Mini",
"model": "Cooper S",
"horsepower": 400,
"year": 2050
}
}
Get all cars. This method will return all available cars
Returns all cars as an array under the cars field.
GET /cars.json
500 if an error occurs
Get a car. This method will return the given car's id.
Return the given car under the carfield.
| Name | Description |
|---|---|
| id | the car's id as a string. |
GET /cars/1237.json
404 if the car can't be found.
500 if an error occurs