Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gabrielbb/vehicles-api

Public REST API to get Vehicles Types, Brands and Models.
https://github.com/gabrielbb/vehicles-api

rest-api spring-boot vehicles-api

Last synced: 16 days ago
JSON representation

Public REST API to get Vehicles Types, Brands and Models.

Awesome Lists containing this project

README

        

# Vehicles API
Public REST API to get Vehicles Types, Brands and hundreds of Models. Unlike similar API's, this one is free.

NOTE: Because i'm using a free server, for now, the server shuts down after 30 minutes of inactivity. If it takes some time, is because nobody made a request in the last 30 minutes

## Paths

| Path | Method | Description | Parameters
|--|--|--|--|
| /brands | GET | Returns all the vehicle brands |
| /types | GET | Returns all the vehicle types |
| /models | GET | Returns Vehicle Models that the brand manufacturer has built. It must be filtered by Brand or Type | `brandId` ID of an object returned from /brands. `typeId` ID of an object returned from /types

## Examples

**Example 1**: Get every available brand (Full result not shown here, too much data)

**Endpoint**: https://the-vehicles-api.herokuapp.com/brands/

**Result**:

```json
[{"id":36,"brand":"Acura"},
{"id":29,"brand":"Alfa Romeo"},
{"id":569,"brand":"Alkanes"},
{"id":400,"brand":"Artic Cat"},
{"id":565,"brand":"Aston Martin"}]
```

**Example 2**: Get every available vehicle type

**Endpoint**: https://the-vehicles-api.herokuapp.com/types/

**Result**:

```json
[{"id":1,"type":"Car"},
{"id":2,"type":"Motorcycle"},
{"id":3,"type":"Ship"},
{"id":4,"type":"Heavy Vehicle"},
{"id":5,"type":"Accesories"}]
```

**Example 3**: Get BMW vehicle models

**Endpoint**: https://the-vehicles-api.herokuapp.com/models?brandId=17

**Result**:

```json
[{"id":384,"model":"Serie 1",
"brand":{"id":17,"brand":"BMW"},
"type":{"id":1,"type":"Car"}},

{"id":1548,"model":"GS",
"brand":{"id":17,"brand":"BMW"},
"type":{"id":2,"type":"Motor"}},

{"id":1640,"model":"Serie 3",
"brand":{"id":17,"brand":"BMW"},
"type":{"id":1,"type":"Car"}},

{"id":1649,"model":"Serie 5",
"brand":{"id":17,"brand":"BMW"},
"type":{"id":1,"type":"Car"}}]