We use your service REST api 7.2v, and your Android HERE WeGo (version 2.0.12509) app in offline mode. Our goal is to be able to create a route using the Routing API - route from A to B (fastest;car) and then send the information to the mobile app.
The expected result would be that from the suggested routes on the mobile app, the first one would be the fastest route, and it will correspond with the one that we created using the api.
The problem: fastest route shown on the HERE WeGo app is not corresponding with the one given from the API call. Also, we noticed that the information for duration and distance that we get from the api, are different on the mobile app for the same route.
Questions: Is it even possible to get the same route results? Are we missing a parameter? Can you give us a suggestion.
The offline and online algorithms are different and will continue to be different because of the resources available to compute the routes are different on hi-perf servers vs constrained devices. So it is not possible to get the same route results. Also the Here We go app comes in online mode, so the best approach is to get the route directly instead of using REST API and sending it in mobile app.
Related
We're currently working on our API based on Google Cloud Functions together with Google's API Gateway.
As every customer who buys access to our API should get their own API key, I'm wondering if there's a ways to create those API keys using and API. What I want to achieve is that a customer is able to request an API key in their own settings, so klick a button, this triggers a function, generates a key and shows it to the customer in front end.
After searching for quite some time, I didn't find anything about how this could be built. It could also be that my approach to this is totally wrong - if that's the case, please roast me and give me some advice with it!
Thanks in advance for your answers!
Google credentials can not be created programmttlcy they must be created manually.
In fact, there is something. A while in beta (more than 1 years ago) and quickly back in alpha, and undocumented (or pretty bad)
As you can see in the gcloud alpha command, you can use API Keys with CLI and API. Use this command to test and discover more how you can use API keys.
gcloud alpha services api-keys create --display-name="created by API" --log-http
USE WITH CAUTION
Firstly, I have no update on this API, will it survive or not? The lifecycle and the "no news" from Google is strange and keep in mind that the API can be removed at any time.
Secondly, API Keys is a long lived token and it's not recommended for security reason. But sometime, it's better than nothing, so to use it when no others solution are possible, it's acceptable. Else, prefer OAuth .
Eventually, API Keys authenticate a project, not a customer/user. You won't have it in header data after the API Gateway request forward. Only the Project ID (or Number, I don't remember). Thus, if you want to differentiate each customer/user, you need to create different projects, and generate a keys in each project. Same thing if you implement rate limit on API Gateway: Quotas are per project and not per API Keys.
I want to use the API to get a map tile and a routing API with different application codes and application identifiers. So that with the credentials for routing, I could not use the API to get tile maps and vice versa. How can I get these credentials?
Please see below Legacy Modules in the web pages.
https://developer.here.com/documentation/maps/topics/migration.html
App Id and app code can be uniquely generated for each project. So if you intend to use different app id and code for different apis then you have to create another Project in the project plan page. App ID and Code provides access to all the apis in Here(as per design) and it is up to your code to restrict the usage to particular api. Here only provides domain whitelisting option for any app credentials.
I hope this help.
I'm running a few car simulations using the HERE Routing REST API, and I'd like to be able to get the accurate speed limit for where the car is so that it doesn't go too quickly or slowly for the simulation.
I can see that the speed limit is included within a link.
However, I can't seem to find how to get a link given its Link ID, or if that's even possible with the current API.
In the old API it seems like there was a getlinkinfo.json endpoint which ought to do what I need, but using it on my current freemium account says that I'm unauthorized.
Is this a feature tied only to pro accounts, is it deprecated, or is there just some other way I have to go about this?
As mentioned in the comment above getlinkinfo.json from Routing API has been depricated for sometime now and the alternative is to use HERE Telematics Advanced Data Sets API (https://developer.here.com/documentation/platform-data/dev_guide/topics/quick-start-view-map-data.html) The data is split into different layers and tiles which could be queried for link attribute information.
Is it possible to either turn off the api explorer completely or limit the access to it?
I noticed some logs in my app that come from failed requests executed from a browser. My api is only consumed by an Android app so the only place where they can come from is the api explorer. Also the api access is limited to 1 web and 1 android client id.
Unfortunately no. The API explorer works by using the Discovery Service associated with your API, which is not actually part of your backend, so you can't specify auth or visibility for those URIs.
The list method from the Discovery service is used to generate the list on the APIs Explorer app using your app as base:
discovery.apis.list:
your-app-id.appspot.com/_ah/api/discovery/v1/apis
When someone clicks one of the APIs from the list, the full discovery document is retrieved for that apiName and apiVersion using the getRest method from the Discovery service:
discovery.apis.getRest:
your-app-id.appspot.com/_ah/api/discovery/v1/apis/{apiName}/{apiVersion}/rest
If you are looking for ways to prevent the executing of the API, check out Cloud Endpoints: Control who can execute API through API Explorer
endpoints makes auth easy and you can get the current user. You should use auth to ensure people don't mess with your private apis - otherwise people could trace what kind of post or get requests you're sending anyway - auth is always a good idea rather than trying to keep your apis secret.
If you're building a secret product and you don't want your competitor to find out, you could perhaps use some obfuscation method on the backend and on your client which makes the apis unreadable.
Also a user messing with your apis shouldn't break your database - or if it does - it should only break it for the user that was being foolish. Having logic in your client for how apis are used so that the backend doesn't break is a bad idea - the backend apis should take care of themselves and not worry about how or why they are used and who by for what purpose.
I have been tasked with building an offline web application that will display maps and also display locations and routes of objects. The requirements are that it run in a web browser, but it will run on a disconnected laptop. It will be receiving continuous, real-time map coordinates data and continuously updating the location of objects and also display historical route data. Is it possible to somehow use Google Maps for this? I know that Google recently announced support for offline maps - but I got the feeling that was specifically for the Android OS and also specifically for mobile devices. If not, Google Maps - does anyone have any suggestions for which mapping technology, API or software would be best for this type of application?
No. This is not possible. You have to load the maps dynamically from the web and you are not allowed to cache information (*you can cache a small amount of information temporarily, but you cannot do bulk or mass downloads).
See Section 10.1.3 of the terms of service:
http://goo.gl/HX3Uj