API - 10io/goat GitHub Wiki
Application
Cars
This is the cars API. It provides ways to search and get cars. Cars are simple json objects with these fields:
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 |
Examples
{
"car": {
"brand": "Mini",
"model": "Cooper S",
"horsepower": 400,
"year": 2050
}
}
Get all cars
Get all cars. This method will return all available cars
Returns all cars as an array under the cars field.
Examples
GET /cars.json
Errors
500 if an error occurs
Get a car
Get a car. This method will return the given car's id.
Return the given car under the carfield.
Parameters
| Name | Description |
|---|---|
| id | the car's id as a string. |
Examples
GET /cars/1237.json
Errors
404 if the car can't be found.
500 if an error occurs