Retrieve roadnames separated by each state HEREapi - here-api

Is it possible to use calculateroute in HERE api to retrieve roadnames/roadnumbers parsed by each state the route travels through?

Routing API request gives the maneuverattributes(roadname, roadnumber) from origin to destination.
Please refer following link for detailed explanation as per your use case
developer.here.com/documentation/routing/topics/resource-calculate-route.html

Related

Apigee rest endpoint path mapping to custom path

I have rest end point /admn_resource_manager.I have created a apigee proxy to expose this.
I dont want to expose it like this to others as I want something like /adminmanager.
Is there any way to map /adminmanager to /admn_resource_manager using Apigee.
end user would use http://someurl.apigee/adminmanager instead of http://someurl.apigee/admn_resource_manager
I explored KeyValueMapoperation and AssignMessage in Apigee.
I am not sure if these are the right option to implement map path.I didn't get any example for this either.
The way you would think to do this would be to use the Assign Message policy and use the Set -> Path element. But this policy isn't currently working as designed for rewriting the proxy's target URL. See the Assign Message Guidance for more details.
To rewrite the incoming URL to a different target URL you can use the Assign Message Policy to set the entire URL (target.url) in the Target Endpoint flow, or you can use a JavaScript callout to set it. I chose to use a JavaScript callout because it gives a lot more control when rewriting the URL.
Here is an example project on Github I put together for this you can use to see how I did it. It uses the swapi.co api as the target endpoint. This proxy uses the Assign Message and JavaScript callout policies to rewrite the URL. Here's some details about it...
Proxy Endpoints
Create a proxy endpoint for each resource you are renaming.
This is where you setup the Assign Message policy to set the variables for the new path suffix.
Assign Message Policies
Set on the PreFlow of each proxy endpoint to set the targetPathSuffix and appendResourceIdToUrl (if needed) variables.
JavaScript Policy
Calls out to the URLRewrite.js file to execute the js code.
Set on the TargetEndpoints PreFlow and executes on each request
Uses the variables set in the Assign Message Policies to change the target.url variable.
I think Apigee can do it.
When I was started Apigee I have learned and try to understand from the picture below. (I think it is describe the main concept of this platform)
From your scenario,
You can specify the URL that you wants client to call maybe someurl.apigee/adminmanager or something else
Apigee is a middle also known as a Gateway. When you received the request from client, you can manage whatever you want. Of course, including pass your client to other URL like someurl.apigee/admn_resource_manager . (You just assigned new url to that request)
Because I'm not an expert as well so, you this link below can explain you more information.
Link:Using Flow Variables

Determine timezone based on location using Here APIs

I want to get get the timezone of a location (lat/long) using the here REST APIs. I know there is a Google timezone API to do this, but I couldn't see any timezone information in any "Reverse Geocoding" API responses for the here REST APIs.
For reverse geocoding you need to add additional parameter locationattributes=tz to the request. Example request:
https://reverse.geocoder.cit.api.here.com/6.2/reversegeocode.json
?prox=50.112,8.683,100
&mode=retrieveAddresses
&app_id=xxx
&app_code=yyy
&gen=9
&locationattributes=tz
You can find a full description of available input parameters by link: https://developer.here.com/rest-apis/documentation/geocoder/topics/resource-reverse-geocode.html

How to create dynamic route in Apigee Edge based on path and verb?

I am trying to define dynamic route in Apigee Edge, but not able to define one, any help will be appreciated.
I think you must be referring to the conditional flows in the proxy endpoint, that way you can specify both verb and path to be checked in the preflow.
Please refer to http://docs.apigee.com/api-services/content/flow-variables-and-conditions for more details.

Apigee Service Callout

I have a service callout in Apigee where instead of hardcoding the Url for the HTTPTargetConnection I want to use a variable for the value of the url.
Example:
http://{request.queryparam.url}
This is giving me a 404 Not Found error but if I hardcode the same value that is passed as a queryparam it works fine and calls the target service and return a response.I am not able to find any details on this in docs.Please help me out.Thanks.
This is potentially a bug.
Please attach a policy of your own in the target.xml request part of the application which assigns the target.url variable with your variable of choice. You can use assign variable or javascript or python as you wish for this policy.
EDIT:
What I answered above applies for target callouts. Not service callouts. To better understand the issue I request you to post the debug.xml in a pastebin or something similar.

How to get URI from which REST API (ServiceStack) being consumed

I have some issue regarding REST API which i have built using servicestack. End user will consume this API from their application hosted on their server. I'd like to grab absolute uri and IP address from which this REST API being consumed.
When i am doing testing it locally as per below then it gives me URL of REST API itself instead of application from where it is consuming.
string str = RequestContext.AbsoluteUri.ToString();
Please how can i get details about source from where my REST API is consuming.
Thanks in Advance.
I'm not sure I understand this question correctly, do you want the referrer url? or physical location path? Either way the Original ASP.NET request object should have all the information you need which you can access in your webservice with:
var aspnetReq = (HttpRequest)RequestContext.Get<IHttpRequest>().OriginalRequest;
Which you can use to access all information about the request.

Resources