I'm trying to get a listing of sessionid and time for specific sessions where the alias.host matches a specific domain within a set time period. However when I use the following it doesn't limit the time period and I get all of the sessions returned:
http://<device>:<port>/sdk?msg=query&query=select sessionid time where alias.host="domain.com"&time1="2012-Dec-03 00:00:01"&time2="2012-Dec-04 00:00:01"&size=1000
or
http://<device>:<port>//sdk?msg=query&query=select%20sessionid20where%20alias.host=%22domain.com%22&time1=%222012-Dec-03%2000:00:01%22&time2=%222012-Dec-04%2000:00:01%22&size=1000
What am I missing?
You need to encode the & as %26 and there should be two of them.
& is the parameter separator for HTTP so if it's not encoded it will actually make the value an additional HTTP parameter instead of a part of the query.
My reply is based on the example above, apologies if you are just trying to make it readable.
Got the issue, I used the wrong quotes on time it's ' instead of "
The following just worked for me:
/sdk?msg=query&query=select%20sessionid,time%20where%20alias.host%3D'google.com'%20%26%26%20time%3D'2012-Dec-03%2000:00:01'-'2012-Dec-04%2000:00:01'&size=1000