2014-03-07 02:40 AM
Hi, I need a help for using Restful API
Here is question
http://[ip:port\/sdk?msg=query&id1=0&id2=0&size=400&query=select+*+where+service=25+&+time="2014-Mar-05"
Contents on red line might be wrong.
but I can't make the solution yet
If I write down like that, there is no error. However the result is totally same. like
http://[ip:port\/sdk?msg=query&id1=0&id2=0&size=400&query=select+*+where+service=25+&+time="2014-Mar-05"
= http://[ip:port\/sdk?msg=query&id1=0&id2=0&size=400&query=select+*+where+service=25
It seems like ignoring backyard command
Also If I want to set time range, how to make it?
query=select+*+where+time>"2014-Mar-05" <== it's wrong
2014-03-10 08:03 PM
A couple points:
- the logical "and" operator is double ampersands ("&&") not single ("&"),
- you may want to URL-escape the entire URL to avoid problems
To specify time ranges you have to provide the quoted starting and ending times separated by a dash:
select time where time='2013-7-1 00:00:00'-'2013-7-1 00:05:59'
2014-03-11 12:13 PM
can check the broker/concentrator logs for same samples.
2014-03-20 03:06 AM
well.. in terms of first question, it doesn't work.
I tried double ampersands("&&")
However, even if I used double ampersands, the result was totally same compare to before one
So "query=select+*+where+service=25+&&+time="2014-Mar-05" is same with "query=select+*+where+service=25"
2014-04-06 09:28 AM
I suggest you use my python application to generate the queries. It will take standard parameters, URL encode them for you, show you the generated URL and then submit the query and show you the results. You can use it to exercise nearly all aspects of the SA Core RESTful interface.
NetWitness NextGen RESTful Python Test App
My talk at the 2012 SA Conference may be useful to:
RSA NWUC 2012 - No Rest for the Weary
Cheers,
Scott