graphhopper / directions-api

Issues for the GraphHopper Directions API
https://graphhopper.com/api/1/docs/
60 stars 25 forks source link

Supported vehicle types in "info" endpoint #43

Open fbonzon opened 7 years ago

fbonzon commented 7 years ago

It would be nice to know, before sending a routing request to the API, what vehicle types are allowed with our API key. Some GraphHopper account types don't have access to all vehicle types, e.g. free accounts have access only to car, foot and bike.

Currently, there is no way to programmatically know if, say, mtb vehicle will be allowed, other than issuing a routing API call and check if it returns an error or not.

From the documentation:

features A json object per supported vehicles with name and supported features like elevation

It is not clear if "supported" refers to the API system itself, or to my specific key used to call the info endpoint.

Currently, all vehicle types supported by the API are returned, regardless of the given API key.

Expected: Either only vehicle types supported by the key are returned. Or a new key is created and returned, telling about allowed vehicles types for the given key.

In all cases, the documentation should be updated and made clear.

karussell commented 7 years ago

Yes, this would be nice to have. But since the changes to our package structure were negligible in the last 2 years, this is not a top priority for us. Same applies to #42