calculateroute.json giving NGEO_ERROR_GRAPH_DISCONNECTED error - here-api

So when I try to call calculateroute.json, I'm getting a NGEO_ERROR_GRAPH_DISCONNECTED error with no further information.
Here's my example call: https://route.api.here.com/routing/7.2/calculateroute.json?app_id=<APP_ID>&app_code=<APP_CODE>&waypoint0=geo!-34.0144128,151.1121957&waypoint1=geo!-33.875455,151.207583&mode=fastest;car;traffic:enabled&departure=2019-11-11T22:27:30
Obviously I've removed our App ID and App Code from that call :).
{
"_type": "ns2:RoutingServiceErrorType",
"type": "ApplicationError",
"subtype": "NoRouteFound",
"details": "Error is NGEO_ERROR_GRAPH_DISCONNECTED",
"additionalData": [
{
"key": "error_code",
"value": "NGEO_ERROR_GRAPH_DISCONNECTED"
}
],
"metaInfo": {
"timestamp": "2019-11-08T00:43:18Z",
"mapVersion": "8.30.102.150",
"moduleVersion": "7.2.201944-5674",
"interfaceVersion": "2.6.74",
"availableMapVersion": [
"8.30.102.150"
]
}
}
Any ideas?
I've tried looking through the docs but it seems I've done everything right and certainly it has worked for us hundreds/thousands of times before.

Indeed, I see the default Routing API does not find a direct route between the start and end waypoints. If you use our advanced Fleet telematics API, it does actually calculates the route.
https://fleet.api.here.com/2/calculateroute.json?app_id=<APP_ID>&app_code=<APP_CODE>&waypoint0=geo!-34.0144128,151.1121957&waypoint1=geo!-33.875455,151.207583&mode=fastest;car;traffic:enabled&departure=2019-11-11T22:27:30
Please use the advanced API if the standard API does not return results.

Related

Does the RingCentral Call Log API Return a "Missed" Value?

In the RingCentral Online Account Portal (https://service.ringcentral.com) and endpoint apps, the call log display shows whether a call was Inbound, Outbound or Missed.
In looking at the API Reference for the Call Log API, it seems that it only sends back Inbound or Outbound for "Direction". Does the developer Call Log API return a "Missed" value? Is there another way to get this information via the Call Log API?
Ref: https://developer.ringcentral.com/api-docs/latest/index.html#!#RefCallLog.html
This question appears to be in reference to the Online Account Portal UI's "Type" column as shown in this screenshot:
The web UI's "Type" column shows Inbound, Outbound or Missed. This can be generated by using the response properties for both direction and result.
direction API response property will be Inbound or Outbound
result API response property is an enumerated value that includes Missed and other values including Voicemail which is the example screenshot. A full list is available in the link below:
Ref: https://developer.ringcentral.com/api-docs/latest/index.html#!#ResultStatusValues
Here is an example response:
{
"uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/call-log?view=Simple&showBlocked=true&withRecording=false&dateFrom=2018-08-27T06:18:00.000Z&page=1&perPage=100",
"records": [
{
"uri": "https://platform.ringcentral.com/restapi/v1.0/account/11111111/call-log/22222222?view=Simple",
"id": "22222222",
"sessionId": "33333333",
"startTime": "2018-08-27T17:38:12.634Z",
"duration": 27,
"type": "Voice",
"direction": "Inbound",
"action": "Phone Call",
"result": "Missed",
"to": {
"phoneNumber": "+16505550101"
},
"from": {
"phoneNumber": "+16505550102",
"name": "LOS ALTOS CA",
"location": "Los Altos, CA"
}
}
],
...
}
Please read this blog to find out more information you can find from the call log.

Retrieving previously calculated route [HERE Maps] using RouteeId fails with RouteNotReconstructed error

I'm calculating routes based on user input. Then storing the routeId and any additional informations I need. But the shape of the road is something I need occasionally; when the user wants to get a preview of the road again.
Since I don't want to store all the points from shape I tried using getroute endpoint (https://developer.here.com/documentation/routing/topics/resource-get-route.html#resource-get-route) but I get this response:
{
"_type": "ns2:RoutingServiceErrorType",
"type": "ApplicationError",
"subtype": "RouteNotReconstructed",
"details": "Error is NGEO_ERROR_ROUTE_DESERIALIZATION",
"additionalData": [
{
"key": "error_code",
"value": "NGEO_ERROR_ROUTE_DESERIALIZATION"
}
],
"metaInfo": {
"timestamp": "2018-08-01T15:01:56Z",
"mapVersion": "8.30.86.150",
"moduleVersion": "7.2.201830-34436",
"interfaceVersion": "2.6.34",
"availableMapVersion": [
"8.30.86.150"
]
}
}
So the question is: why do I get the error? Following the API documentation https://developer.here.com/documentation/routing/topics/resource-type-error-route-not-reconstructed.html I can exclude wrong routeId (it works for routes saved e.g. today but not for the older ones).
The route was calculated using the same version (7.2)
Is the routeId stored only for a certain amount of time?
If so, how long?
RouteID changes with map version.
https://developer.here.com/documentation/routing/topics/request-route-information.html
You'd need to recalculate periodically to get up to date RouteIDs.

Wrong intent in Alexa Skill Request when using the simulator

I set up my intents using this intent schema:
{
"intents": [
{
"intent": "StartIntend"
},
{
"intent": "AMAZON.YesIntent"
},
{
"intent": "AMAZON.NoIntent"
}
]
}
My sample utterances look like this (it's german):
StartIntend Hallo
StartIntend Moin
StartIntend Guten Tag
Why does the Amazon Developer Console generate the following request, when I use the utterance "Yes" or "Ja"?
{
"session": {
"sessionId": "SessionId...",
"application": {
"applicationId": "amzn1.ask.skill...."
},
"attributes": {},
"user": {
"userId": "amzn1.ask.account...."
},
"new": true
},
"request": {
"type": "IntentRequest",
"requestId": "EdwRequestId...",
"locale": "de-DE",
"timestamp": "2017-02-17T21:07:59Z",
"intent": {
"name": "StartIntend",
"slots": {}
}
},
"version": "1.0"
}
Whatever I enter, it always is using the intend StartIntend.
Why is that? What have I forgotten / what have I done wrong?
The schema and utterance look correct.
I tried duplicating what you are seeing by performing the following steps:
Copied them as-is into a new skill on my account
Selected the North America region on the Configuration page.
Set the lambda to point to an existing lambda that I have. For testing purposes, I just need a valid ARN. I'm going to ignore the response anyways.
Then entered "Yes" into the service simulator
It indeed sent the Lambda the AMAZON.YesIntent.
So I conclude that there's nothing with the data you posted.
I tried entering Ja which resulted in the StartIntend, but I guess I would expect that since Ja is not "Yes" in North America.
Have you set the region to Europe, and entered a Lambda for the Europe region?
I talked about it with the Amazon Support. After some experiments it turned out, you have to write "ja" in lowercase. It seems to be a bug in the simulator itself.
When creating the skill in the Alexa Skills Kit, you need to choose the correct language i.e. German, see screenshot below.
Everything else seems to be correct.

Watson conversation API returns empty output for yes and no input

I've set up a very simple script and part of it requires a yes or no response from the user.
When I test the script through the script builder at ibmwatsonconversation.com the script works fine.
But when I'm testing it through Postman making HTTP POST requests when I get to the part that requires a yes or no answer the output node is always
"output": {
"log_messages": [],
"text": [],
"nodes_visited": [
"node_25_1480610375023"
]},
The previous two nodes in the conversation work fine.
I have set up intents for yes and no, see images below:
The dialog is as follows:
Here's the chain of requests / responses:
{"input": {"text": "hello"}}
"output": {"log_messages": [],"text": ["Welcome to the KMBC IT help desk.How can I help you?"],"nodes_visited": ["node_1_1480509441272"]},
then
{"input": {"text": "my laptop is broken"}}
"output": {
"log_messages": [],
"text": [
"I'm sorry to hear that your laptop isn't working. \n\nI need you to check a couple of things for me, is that ok?"
],
"nodes_visited": [
"node_3_1480509642420",
"node_19_1480518011225"
]},
finally
{"input": {"text": "yes"}}
"output": {
"log_messages": [],
"text": [],
"nodes_visited": [
"node_25_1480610375023"
]},
Works fine inside the "Try it out" panel within the workspace:
Full JSON request / response:
{"input": {"text": "hello"}}
{"intents": [{"intent": "greetings","confidence": 1}],"entities": [],"input": {"text": "hello"},"output": {"log_messages": [],"text": ["Welcome to the KMBC IT help desk. How can I help you?"],"nodes_visited": ["node_1_1480509441272"]},"context": {"conversation_id": "4b5b1858-ae4e-4907-a3ab-c49abf601fd3","system": {
"dialog_stack": [
{
"dialog_node": "root"
}
],
"dialog_turn_counter": 1,
"dialog_request_counter": 1
}}}
{"input": {"text": "laptop broken"}}
{"intents": [{"intent": "complaint","confidence": 0.989692384334575}],"entities": [
{"entity": "hardware",
"location": [
0,
6
],
"value": "laptop"
}],"input": {"text": "laptop broken"},"output": {"log_messages": [],"text": ["I'm sorry to hear that your laptop isn't working. \n\nI need you to check a couple of things for me, is that ok?"],"nodes_visited": ["node_3_1480509642420",
"node_19_1480518011225"]},"context": {
"conversation_id": "b53dff12-9252-4b7e-abe8-7b45f561d394",
"system": {"dialog_stack": [{"dialog_node": "node_19_1480518011225"}],
"dialog_turn_counter": 1,
"dialog_request_counter": 1}}}
{"input": {"text": "yes"}}
{"intents": [{"intent": "yes","confidence": 1}],"entities": [],"input": {"text": "yes"},"output": {"log_messages": [],"text": [],"nodes_visited": ["node_25_1480610375023"]},"context": {"conversation_id": "b9ddc5b0-5f3c-423f-9bbe-5a1ef013c175","system": {"dialog_stack": [{"dialog_node": "root"}],"dialog_turn_counter": 1,"dialog_request_counter": 1}}}
Based on the full JSON request/response, your issue is here (actually it's also in the previous call, but that works by concidence):
{"input": {"text": "yes"}}
Conversation is stateless, so you need to send back in the context object you received previously. Otherwise the system doesn't know where to continue. The following request object should look like this:
{
"input": {"text": "yes"},
"context": {
"conversation_id": "b53dff12-9252-4b7e-abe8-7b45f561d394",
"system": {
"dialog_stack": [{"dialog_node": "node_19_1480518011225"}],
"dialog_turn_counter": 1,
"dialog_request_counter": 1
}
}
I would recommend to use the Watson Developer Cloud SDK to manage this for you.
https://github.com/watson-developer-cloud
Have you actually created a yes and no intent ?
There is a lot of debate about the best process to handle yes and no responses. But I have found that by creating a yes and no intent, with example "yes" and "No" responses works well.
Your example questions for these intents could include responses like "ok", "yess", "on no","yes please" etc.

How to "Add guest" to event via google calendar API?

could you please give me a hint on how to share a single event via google calendar api?
That is I'd like to invite other users to see the event programmatically without sharing the whole calendar. To mimic the "Add guests" UI action
As Claudio mentioned, you need to use the Google Calendar Advanced API for this.
You'll want to use a patch because you don't want to replace all the other data on the calendar invite. However, even in the case of patch, since the attendees lives in an array, if you attempt to pass a patch such as this:
{
attendees: [ { email: "new#example.com"} ]
}
... it'll replace all old invitees (i.e. it'll remove anyone that was on the invite before you called patch). To fix this, you must first get the current invitees, add a new person to the array, and then send a patch.
You can see a detailed example of this in this answer which also explains how to use Google Apps Scripting to ensure an email is sent to the user when adding them to a calendar event (see the addGuestAndSendEmail() method in that post).
You can use the API to add people to the attendees collection:
https://developers.google.com/google-apps/calendar/v3/reference/events/update
refer the following request.
method: POST
endpoint: https://www.googleapis.com/calendar/v3/calendars/primary/events?sendUpdates=all
here, sendUpdates means when you add any guest so he would get an invitation mail used based on scenario.
Input Json:
{
"kind": "calendar#event",
"etag": "etag",
"status": "confirmed",
"summary": "JayKara",
"description": "eqwbdjhwhhwhhwrhjehrhejhfj",
"location": "America",
"creator": {
"email": "#mail.com",
"self": true
},
"organizer": {
"email": "#mail.com",
"self": true
},
"start": {
"date": "2019-12-23"
},
"end": {
"date": "2019-12-24"
},
"originalStartTime": {
"date": "2019-12-24"
},
"visibility": "public",
"attendees": [
{
"email": "****#mail.com" //this guys are the guest
}
]
}.
After that there is no patch method required your guest guys will receive an invitation whenever update event
Cheers!

Resources