InsightIDR REST API

I am wondering if any one have used the command “Get A Long Running Query: /log_search/query/{query_id}”
no any returned data when using the query_id

1 Like

Hi Moshen,

are you sure you are using a valid query_id? how are you getting this URL?

initially you must poll the href URL returned from your Get Query call within 20 seconds or the query will die and the queryid will be invalidated,

and you must continue to poll the subsequently returned href each time, not the original URL - until there is no href URL and the progress is complete.

https://docs.rapid7.com/insightidr/log-search-api/#operation/getLongRunningQuery

see here:
There is no limit on how frequently you can poll a query, or how many times you may poll it. However, if you do not poll a query resource for 20 seconds, it will expire. Subsequent calls to that resource will return a 404.

David
Rapid7

1 Like