Nokia MapImage Route REST API max. number of POIs - rest

We are using Route REST API and we experience problem when passing many POIs to HTTP request (parameters "poixN"). Our request has about 1000 POIs and some of them are truncated (hard to count, but definitely not all are shown). Here's an example request (first line is URL, the others are parameters passed with POST):
http://maps.nlp.nokia.com/mia/1.6/route?app_code=<APP_CODE>&app_id=<APP_ID>
h=440
w=1030
poix0=52.2420610745,21.0951604874;FFFFEA00;FFFFEA00;1;.
poix1=52.2420610745,21.0952168365;FFFFEA00;FFFFEA00;1;.
poix2=52.2420610745,21.0951024308;FFFFEA00;FFFFEA00;1;.
poix3=52.2047067699,20.9944339802;FFFFEA00;FFFFEA00;1;.
...
poix940=52.1749134848,20.9056261531;FFEE7AFF;FFEE7AFF;1;.
q=100
Is there a limit for number of POIs? What about other parameters like "r"?
We use enterprise version. Thank you in advance.
Edit
Ok, after some research I know the limit for "poixN" is 99. Any way to increase the limit?

I don't think it is possible to increase the number of POIs available using the Map Image API, but it would be possible to obtain a screenshot of a more complex map using the Enterprise Maps API for JavaScript using the ContextMenu.captureHandler
You can add the captureHandler to a context menu as shown:
var contextMenu = new nokia.maps.map.component.ContextMenu();
contextMenu.addHandler(nokia.maps.map.component.ContextMenu.captureHandler);
map.components.add(contextMenu);
You can then obtain a screenshot with all your POIs, which could then be used for printing for example.The HERE Maps Community on GitHub hosts a working example specifically for printing which uses hi-res tiles from the Map Tile API as well. Note that screen capture only works on the Firefox Browser.
Since you have such a high number of POIs, I would also recommend looking at clustering to avoid overwhelming your users with too much information.

Related

Using additional request parameters in Twitter Premium Search API

I am using the Twitter API from Matlab, specifically by means of the twitter class from the Datafeed Toolbox.
I have essentially followed the example code from the official documentation. I created a Twitter app in my Twitter developer page, and obtained its API keys and access tokens. With those I can use the Twitter Standard search API from Matlab:
c = twitter(consumerkey,consumersecret,accesstoken,accesstokensecret);
% The variables 'consumerkey' etc are defined as character vectors
s = search(c,tweetquery,'count',100); % this works
Now I want to use the Premium search API. This has two endpoints for accessing Tweets:
30-day endpoint: provides Tweets from the previous 30 days.
Full-archive endpoint: provides complete and instant access to Tweets dating all the way back to the first Tweet in March 2006.
In addition, the Premium API has two tiers of access:
Free Sandbox access that enables initial testing and development.
Paid Premium access that provides increased access.
The link above specifies the restrictions associated to sandbox as compared with paid access.
I am trying to use the full-archive endpoint with sandbox access. For that I had to create a developer environment on Twitter, which I named dev.
The search method in Matlab's twitter class (which worked for the Standard access, as described above) doesn't seem to work with the Premium access. But I noticed that search actually calls getdata, and the latter does work for Premium access as follows. First, the Premium access URL needs to be defined:
c.URL = 'https://api.twitter.com/1.1/tweets/search/fullarchive/dev.json';
and then the following syntax works:
s = getdata(c,c.URL,'query','Jimi Hendrix'); % this works
I have also been able to add operators within the query string, for example to specify a range of geographical positions or to restrict the search to tweets that contain images:
s = getdata(c,c.URL,'query','place:"Palo Alto"'); % this works
s = getdata(c,c.URL,'query','Robert Smith bounding_box:[-0.2 51.4 0.1 51.6]') % this works
However—and this is my question—, I haven't been able to use additional request parameters defined in the Twitter API to refine the search, such as fromDate, toDate or maxResults:
s = getdata(c,c.URL,'query','John Frusciante', 'fromDate', '201708130000') % doesn't work
s = getdata(c,c.URL,'query','Rob Scallon', ...
'fromDate', '201708130000', 'toDate', '201708150000') % doesn't work
s = getdata(c,c.URL,'query','Michael Lemmo', 'maxResults', '20') % doesn't work
All of the above return an HTTP/1.1 422 Unprocessable Entity error.
Is my syntax not correct? Maybe the fromDate etc parameters have to be part of the query string? Or maybe the sandbox tier of the Premium search doesn't support those parameters?
For context, I don't really know what all those terms like endpoint, tier, developer environment and token mean, but still I'd like to make this work.
Going by the description at https://developer.twitter.com/en/docs/tweets/search/api-reference/premium-search#DataParameters, what you call 'addition request parameters' are defined for requests of type POST /search/:product. These are HTTP POST requests, can you try using postdata (https://in.mathworks.com/help/datafeed/twitter.postdata.html) instead of getdata. Their usage is almost identical.

Magento 2 Rest Api V1/products missing extension attributes

I am calling the Rest API V1/products to get the product list from Magento 2 store
Request:
http://{myMagentohost}/Magento/index.php/rest/V1/products?searchCriteria[currentPage]=1&searchCriteria[pageSize]=1
Response:
{"items": [ { "id": 1,"sku": "24-MB01","name": "Joust Duffle Bag","attribute_set_id": 15,"price": 34,"status": 1,"visibility": 4,"type_id": "simple","created_at": "2017-06-13 09:36:11","updated_at": "2017-06-13 09:36:11","product_links": [{"sku": "24-MB01", "link_type": "upsell","linked_product_sku": "24-MB03","linked_product_type": "simple","position": null,"extension_attributes": []},{"sku": "24-B01","link_type": "upsell","linked_product_sku": "24-WB04","linked_product_type": "simple","position": null,"extension_attributes": []}],"options": [],"tier_prices": [],"custom_attributes": [{"attribute_code": "description","value": "<p>The sporty Joust Duffle Bag can't be beat - ot in the gym, not on the luggage carousel, not anywhere. Big enough to haul a basketball or soccer ball and some sneakers with plenty of room to spare, it's ideal for athletes with places to go.<p>\n<ul>\n<li>Dual top handles.</li>\n<li>Adjustable shoulder strap.</li>\n<li>Full-length zipper.</li>\n<li>L 29\" x W 13\" x H 11\".</li>\n</ul>"},{"attribute_code": "image","value": "/m/b/mb01-blue-0.jpg"},{"attribute_code": "small_image","value": "/m/b/mb01-blue-0.jpg"},{"attribute_code": "thumbnail","value": "/m/b/mb01-blue-0.jpg"},{"attribute_code": "url_key","value": "joust-duffle-bag"}]}],"search_criteria": {"filter_groups": [],"page_size": 1,"current_page": 1},"total_count": 2046}
Now according to the Magento 2 Rest API swagger documentation,
catalogProductRepositoryV1, GET /V1/products in response it shows the extension_attributes but when I actually call this api from postman extension_attributes is missing.
I search for it but no appropriate solution is available.
Can anyone help in this matter?
Thanks!
We are using M2Ent Cloud Edt and we have an open ticket with Magento support who confirm this is a problem with the REST API.
To circumvent, we initially looped through all products via V1/products using pagination (Fastly as a 60s timeout otherwise), and then called V1/products/{sku} to get all the details (which correctly includes the extension_attributes node.
They have not given us an ETA on a fix.

We can not retrieve image url for the product from 3dcart.com

we are using the following Rest API with default values for limit and offset.
https://apirest.3dcart.com/Help/Api/GET-3dCartWebAPI-v1-Products-catalogid-Images_limit_offset
We are invoking on a standard out of the box 3d cart sample store with sample products. We can verify that the product with the correct catalogid has images.
The response we got is http 200 code and an empty array [].
We tried different values for limit and offset.
Could you advise? Did we use the wrong api?
Thanks.
The article
https://apirest.3dcart.com/Help/Api/GET-3dCartWebAPI-v1-Products-catalogid-Images_limit_offset
is wrong. Now we need use the url
http://apirest.3dcart.com/3dCartWebAPI/v1/Products?catalogid=XXXX
for images.
You would get a collection with the image information as follows:
"MainImageFile":"assets/images/generic/tshirt.jpg",
"MainImageCaption":"",
"ThumbnailFile":"assets/images/generic/tshirt_thumbnail.jpg",
"MediaFile":"",
"AdditionalImageFile2":"",
"AdditionalImageCaption2":"",
"AdditionalImageFile3":"",
"AdditionalImageCaption3":"",
"AdditionalImageFile4":"",
"AdditionalImageCaption4":"",
"ImageGalleryList":
Thanks.

Why does one HTTP GET request retrieve the required data and another retrieve []

I'm currently working on ng-admin.
I'm having a problem retrieving user data from my REST API (connected to a MongoDB) and displaying it.
I have identified the problem as the following:
When I enter http://localhost:3000/users into my browser, I get a list of all users in my database.
When I enter http://localhost:3000/users?_page=1&_perPage=30&_sortDir=DESC&_sortField=id,
I get [] as a result.
I am quite new to this, I used both my browser and the POSTMAN Chrome extension to test this and get the same result.
http://localhost:3000/users_end=30&_order=DESC&_sort=id&_start=0
This (/users_end) is a different request than /users.
It should be:
http://localhost:3000/users?end=30&_order=DESC&_sort=id&_start=0
Or, by looking at the other parameters:
http://localhost:3000/users?_end=30&_order=DESC&_sort=id&_start=0
with end or _end being the first parameter (mark the ?).
Update (it is ? and before the _, I have edited.):
If adding parameters to the request returns an empty list, try adding only one at a time to narrow down the problem (there's probably an error in the usage of those parameters - are you sure you need those underscores?).
Your REST API must have a way to handle pagination, sorting, and filtering. But ng-admin cannot determine exactly how, because REST is a style and not a standard. So ng-admin makes assumptions about how your API does that by default, that's why it adds these _end and _sort query parameters.
In order to transform these parameters into those that your API understands, you'll have to add an interceptor. This is all thoroughly explained in the ng-admin documentation: http://ng-admin-book.marmelab.com/doc/API-mapping.html

v3 IPP FindAll is not returing the correct paged data when Customers are sub-customers

I'm using the below line:
commonService.FindAll(new Intuit.Ipp.Data.Customer(), currentPage, itemListPageSize).ToList();
When returning multiple pages the paging isn't returning the right rows on page if there are sub-customers. To reproduce, just create several customers and retrieve the second page like:
commonService.FindAll(new Intuit.Ipp.Data.Customer(), 2, itemListPageSize).ToList();
When it retrieves page 2, the first page's data is returned.
Am I doing something wrong?
FindAll with paging actually uses query endpoint.
Please mention if you are trying this call against QBD/QBO.
Can you please capture the raw request and response of the above call and share in this post.
(for that you can enable logger as mentioned in the following docs, or you can configure your app with any http snooper like Fiddler.)
https://developer.intuit.com/docs/0025_quickbooksapi/0055_devkits/0150_ipp_.net_devkit_3.0/logging
You can try this call directly using ApiExplorer. Please verify if you are getting the same result.
https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/020_key_concepts/00300_query_operations/0100_key_topics#Pagination
Thanks