Postman mockserver Adding Examples - postman

Imagine a scenario where i have a "sales" endpoint. It can be further filtered on say by region i.e europe and america
Steps i followed
I created mock server and created sales/{{customregion}} like shown below
2)named the mockser testms
3)now i click on the request and then click on Examples on top right .
I rename default to europe and add another eg as america
same way i created random json response sample for america as well
Now my question is below
If i mistype the endpoint i still get the result. Let's look at each case
Eg1)https://21ad39c9-aebc-49a5-88d0-8e1abad0a2d8.mock.pstmn.io/sales/europe
result as expected gives data configured for europe
Same works for america as well i.e it gives results configured for america
Eg2)instead of europe i give europes and it still works ..how ??eg below
Eg3) Same way i gave eurospe instead of europe and that worked too.
Eg4) only if i mistype it completely it gives below error which is correct
whole thing has got me a little confused. First how does {{customregion}} variable works and how it works even if there is a typo. But if misspelled, may be more than 1 character it gives an error. Can anyone please explain this in detail

In case of a mispelled route Postman tries to return the "closest" matching example route as a fallback. It is not possible to predict this deterministically.

Related

Display Date as Local Timzone, in AWS Quicksight (i have multiple timezones in 1 dataset)

I have referenced this thread in Stackoverflow
I have a dataset in Quicksight and it contains multiple timezones (Australia, India, Japan Korea).
i tested out one of the answers/solution (see below) and this works well. But this converts everything to Japan timezone.
parseDate(toString(formatDate({start_date},'MM-dd-yyyy HH:mm:ss','Asia/Tokyo')),'MM-dd-yyyy HH:mm:ss')
So I tried to incorporate ifelse into the Calculated Field option like below. But it showed error. I am also not sure where to click to understand where is the error. any one has experience with this, please advice, thanks!
ifelse(
{country}='Japan',
parseDate(toString(formatDate({start_date},'MM-dd-yyyy HH:mm:ss','Asia/Tokyo')),'MM-dd-yyyy HH:mm:ss'),
{country}='Korea',
parseDate(toString(formatDate({start_date},'MM-dd-yyyy HH:mm:ss','Asia/Seoul')),'MM-dd-yyyy HH:mm:ss'),
{country}='Australia',
parseDate(toString(formatDate({start_date},'MM-dd-yyyy HH:mm:ss','Australia/Melbourne')),'MM-dd-yyyy HH:mm:ss'),
{Start_date})

Amazon Product Advertising API - Get all OfferListingID's for ASIN

As you know, it is possible that to find multiple offers for one ASIN on Amazon (different sellers), which byside compete to finally get the buy box.
Every offer for these ASIN has its unique OfferListingID, which makes it possible to address. But how can I get all the OfferListingID's for one ASIN?
Example Request:
http://webservices.amazon.de/onca/xml?
AWSAccessKeyId=[AccessKey]&
AssociateTag=[AssociateTag]&
IdType=ASIN&
ItemId=B00A6N2TKK&
Operation=ItemLookup&
ResponseGroup=Offers&
Service=AWSECommerceService&
Timestamp=2016-07-24T20%3A27%3A50Z&
Signature=[Signature]
The Response contains only one offer with its OfferListingID:
The current buy box winner.
What I want to have is the OfferListingID for another seller, which supports Amazon Prime but is a bit more expensive. With the OfferListingID I will be able to address these specific seller for example a remote cart on my website.
If I work with parameter conditions=All I get the right number of TotalNew (6) but TotalOffers is still 1 and should be 6 too:
<Item>
<ASIN>B00A6N2TKK</ASIN>
<ParentASIN>B00A6N2P4K</ParentASIN>
<OfferSummary>
<LowestNewPrice>
<Amount>###</Amount>
<CurrencyCode>EUR</CurrencyCode>
<FormattedPrice>EUR #,##</FormattedPrice>
</LowestNewPrice>
<TotalNew>**6**</TotalNew>
<TotalUsed>0</TotalUsed>
<TotalCollectible>0</TotalCollectible>
<TotalRefurbished>0</TotalRefurbished>
</OfferSummary>
<Offers>
<TotalOffers>**1**</TotalOffers>
<TotalOfferPages>1</TotalOfferPages>
<MoreOffersUrl>
Where is the problem in my logic? Is there another way to get a OfferListingID for an specific offer for an ASIN?
Thanks for your help!!!
In here as my reaserch and understanding, it refer not for offers, but about sellers
<TotalNew>**6**</TotalNew>
<TotalUsed>0</TotalUsed>
<TotalCollectible>0</TotalCollectible>
<TotalRefurbished>0</TotalRefurbished>
Here This item has 6 new item sellers, 0 used item sellers and so on.. It was true always with my studies on aws.

Is there a limit to how long a filename URL statement can be?

I am on design number three I think now of a program that submits a series of stock tickers and metrics to Yahoo Finance. I don't need to go into too much total about what it does as I have got most of it up and running now apart from one remaining issue.
The Yahoo Finance site lists about 2700 stock tickers on the NASDAQ alone. I anticipated that submitting all of these in one filename URL statement might fall over for some reason, so set an initial string length of 500 tickers and built some nested macros to iterate through in 500 ticker blocks until everything I wanted had been extracted.
However during development of the code it seems that if I build a string with any more than about 200 tickers in I get an error telling me that SSL Support cannot be run and the code falls over.
Does anyone have any idea why this is? In ideal world I would like to be able to do this code in one pass where all 2700 stock tickers are pulled down. If this isn't possible if someone could explain why not that would be great.
Thanks

API to get current weather conditions for any point on Earth

I'm in the planning phase of a project and one of the requirements is that the system be able to get the current weather conditions for any point on Earth, given a set of latitude-longitude coordinates.
I signed up for Wunderground.com's Weather API, but immediately realized this wouldn't work. If you enter a set of coordinates that doesn't correspond to a known city, the API returns a "querynotfound" error with the description "No cities match your search query."
Does a service like this exist?
EDIT: To clarify, I might need the current weather conditions for some arbitary point in (say) the Atlantic ocean.
Have you looked at google api?
http://www.google.com/ig/api?weather=,,,40467626,-03609910&hl=es
I think this is what you are looking for Using Google Weather API with Lat and Lon - how to format?
Edited 29th Aug 2012
As mentioned by "azgolfer" as of August 25th, 2012. Google has phased out it's API. Try http://www.wunderground.com/ instead.

Yahoo Maps Geocode

How Do I work around a problem with the yahoo map geocode result set? The result set being returned is wrong. The city field contains the city, region and postal code. As seen below.
Is there a way to work around this issue without breaking scalability.
-33.924320
151.187057
203 Coward St
MASCOT NSW 2020
Australia
AU
The Yahoo geoencoding returns usually an XML or a PHP serialized. By querying the encoding service I suppose you already have the address and you want to get the coordinates for your geoPoint. It is possible that you are feeding the maps engine with a wrong request.
If you think you found a bug you can send them an email, but I suggest you to check with other locations or to publish first here your code in order to spot the eventual errors.