0
votes

I working with Java REST API's quiet for a while, mostly wither we use query or path option for passing the parameters. Recently I came across one REST api where they are passing the params like as shown below using :

https://{org_name}.domain.com/api/v1/search/?aql=in:connections timeFrame:"7 Days" protocol:Wi-Fi

Can someone please explain me what exactly these are (aql=in:connections timeFrame:"7 Days" protocol:Wi-Fi).

Which framework or libraries are used for building this. The reason why I am posting this SO is because I was asked to build a similar implementation, to do I want to understand what exactly this is and how to implement it.

1
Library / Framework recommendation questions are off-topic here.Quentin
We can't tell you exactly that those are other than "colons and quotes in the query string" which isn't much more interesting than "cs, os, and ns in the query string". They might have some significance in whatever they are processing them with, but since you aren't writing their server side code, you don't need to care about it.Quentin
(Stackoverflow isn't really a good place to ask questions like "What problem is some third party trying to solve with code like this?" as any answer is likely to be highly speculative and opinionated (and that does double when there isn't any context).Quentin

1 Answers

-1
votes

I try to answer as I understand.

As you know, it is query string. There is a minor different than standard one-word query string. It has whitespaces. Probably, server side may act like proxy, it can send the incoming query string as it is to query something from another system . Or, it will split query string by whitespaces to get each individual variable, "in", "timeFrame", "protocol". If you are responsible to make this query from your code to this RestAPI, then you need to apply URL Encoding your query string. Here is one of the best discussion about URL encoding.

Java URL encoding of query string parameters