Unexpected response data from HERE autosuggest endpoint - here-api

The response from HERE's /autosuggest endpoint has unexpected element in it.
When making a request to Here autosuggest endpoint like: https://places.cit.api.here.com/places/v1/autosuggest?at=51.73771300000001,19.454722&q=wlokniarzy 91&maxresults=10&language=sv&additionaldata=Country2,true&cs=pds&result_types=address,place&addressFilter=countryCode=POL
In the response third element looks like:
{
"title": "91",
"highlightedTitle": "<b>91</b>",
"vicinity": "92-432 Lodz",
"highlightedVicinity": "92-432 Lodz",
"position": [
51.79221,
19.42193
],
"category": "900-9400-0401",
"categoryTitle": "Street or Square",
"bbox": [
19.421049,
51.791988,
19.422041,
51.792599
],
"type": "urn:nlp-types:place",
"resultType": "address",
}
Which I think should not show up looking like that.
It hard to even guess what this place suppose to be.
Is it a bug in Here autosuggest endpoint?

We will take a look at the place, and the place should be removed from Place API.
Thank you for the report!

Related

WooCommerce GET Requests wp-json/wc/v3/products/categories?page=1 shows random categories on each call?

Our onlineshop recently has issues getting the correct category orders over to our stock management system via API.
Whenever we test the API Calls in Postman with:
wp-json/wc/v3/products/categories?page=1
we get a completely random category order output like this:
First call:
[
{
"id": 5179,
"name": "Redmi Note 2022",
"slug": "redmi-note-2022",
"parent": 3054,
Second call:
[
{
"id": 5181,
"name": "Displayeinheit",
"slug": "displayeinheit-redmi-note-2022",
"parent": 5179,
Any advice how we can resolve this issue?
The issue has been resolved:
The problem was caused by the plugin:
https://wordpress.org/plugins/taxonomy-terms-order/

HTTP 400 response received

The following HTTP request was sent and an HTTP 400 response was received. What is wrong with the request that caused it to fail?
POST /api/v2/organizations/4523jddfgd/projects HTTP/1.1
Host: www.reddit.com
Content-Type: application/json
Authorization: Bearer VALID_API_TOKEN
[
"name": "Project 1",
"package": "Standard",
"address": {
"street": "12456 Main St",
"city": "Dallas",
"zip": "75200",
"state": "TX",
"country": "USA"
}
]
This is an interview question, can you help guys ?
Have a look at the MDN wiki page about HTML status code 400.
Status code 400 points to a client side error e.g. malformed request body. Another reason could be that a required header is missing. As indicated in the MDN wiki page you should not attempt to send the very same request unmodified again as the result will be the same as it is not a server side issue.
What you should do instead is: consult the API documentation again and make sure that no header is missing and the request body is valid (i.e. valid JSON/ XML/ whatever in the correct structure).
Looking at your request I can see that the body is not valid JSON.
[
"name": "Project 1",
"package": "Standard",
"address": {
"street": "12456 Main St",
"city": "Dallas",
"zip": "75200",
"state": "TX",
"country": "USA"
}
]
This cannot be parsed, hence the error. An array cannot hold properties. What is missing is a { and } after the [ and before the closing ].
Using the following request body should work.
[
{
"name":"Project 1",
"package":"Standard",
"address":{
"street":"12456 Main St",
"city":"Dallas",
"zip":"75200",
"state":"TX",
"country":"USA"
}
}
]
EDIT
As #Evert pointed out, it is more likely that you need to replace [] with {} as POST requests are used to create single new resources. But the only way you can be absolutely sure is by reading the API documentation.
{
"name":"Project 1",
"package":"Standard",
"address":{
"street":"12456 Main St",
"city":"Dallas",
"zip":"75200",
"state":"TX",
"country":"USA"
}
}

How to write parameter name with space in it? Custom Integromat apps

Api sends me a response with "Joined at" parameter, and I cant do anything with it because of the space " ", but that paramter is vital for one trigger in my Integromat app.
"trigger": {
"id": "{{item.id}}",
"date": "{{item.attributes.Joined at}}",
"type": "date",
"order": "desc"
}
Response example
You can use backticks to retrieve collection properties, as explained in the docs.
The expression will look like this: "date": "{{item.attributes.`Joined at`}}"

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.

How to retrieve versioned document's content in Alfresco by REST API?

Is there a way to retrieve versioned content of document? Possibly by native Alfresco's REST API.
The answer given by Matteo Calò is technically correct. That API does exist and it does what he says. However, that endpoint is marked with "limited support" which means you should be cautious when using it. Instead, you should prefer API's marked "PUBLIC" or use standards-based API's like CMIS, which Alfresco supports.
The CMIS browser binding can be used to get an object's content like this:
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser/root/test/test.txt
Its properties like this:
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser/root/test/test.txt?cmisselector=object
And its versions like this:
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser/root/test/test.txt?cmisselector=versions
In this example I'm retrieving the object by path. My test object is in a folder called test and my object's name is test.txt. If, on the other hand, you know the object's ID, you could get its versions like this:
http://localhost:8080/alfresco/api/-default-/public/cmis/versions/1.1/browser/root?cmisselector=versions&objectId=54f47f6f-ee88-4612-8206-ebca8f5b7e6b;3.0
Any time you can use a CMIS URL to give you what you need, you should use it, especially if the alternative is a web script that may not be fully public.
There is follow API:
http://HOST:PORT/share/proxy/alfresco/api/version?nodeRef=NODEREF
it returns a list of versions with metadata of NODEREF like this:
[{
"nodeRef": "versionStore://version2Store/60d3d217-e80b-4066-9e43-6361bb573462",
"name": "prova1.json",
"label": "1.11",
"description": "",
"createdDate": "08 lug 2016 12:21:49 GMT+0200 (CEST)",
"createdDateISO": "2016-07-08T12:21:49.843+02:00",
"creator": {
"userName": "admin",
"firstName": "Administrator",
"lastName": ""
}
},
{
"nodeRef": "versionStore://version2Store/a1b38d5e-2556-416a-908e-180687d3ff8c",
"name": "prova1.json",
"label": "1.10",
"description": "",
"createdDate": "07 lug 2016 13:20:44 GMT+0200 (CEST)",
"createdDateISO": "2016-07-07T13:20:44.804+02:00",
"creator": {
"userName": "admin",
"firstName": "Administrator",
"lastName": ""
}
}]

Resources