How do I run a complex query using API?
I am failing to send the below query using API call. Can some one help me provide a query that I can run from firefox RestClient (and not a CURL request) _collector=Rave-LAB1-gambit-rave-perf* and not "app_status" | parse "*T /apps/edc/*/* * 0 0 * " as del2,reqType1,reqType2,reqType3,time nodrop | split reqType2 delim='/' extract 1 as reqType2, 2 as reqType3, 3 as reqType4 | toUpperCase(reqType1) as reqType1| toUpperCase(reqType2) as reqType2 | toUpperCase(reqType3) as reqType3 | toUpperCase(reqType4) as reqType4 | if(reqType1 matches "API",concat(reqType3," - ",reqType4),concat(reqType1," - ",reqType2)) as request | timeslice 5s | time/1000 as t | count(t) as total_req,min(t) as minimum, avg(t) as average,max(t) as maximum, pct(t,90) as percentile_90,pct(t,75) as percentile_75,pct(t,50) as percentile_50 by request | sort by average desc
-
Hi Tapan, the queries are identical for API and UI. You may need to encode the query string however when using the search API (not search job API) since the query is passed as a URL parameter. You can use this URL to encode: http://meyerweb.com/eric/tools/dencoder/ Thanks Olaf
Please sign in to leave a comment.
Comments
1 comment