Limit + Offset cannot exceed 10000 for discover.py getHosts #1146
-
I am trying to determine the correct way to get all hosts when you have more then 10000. Originally I started with https://github.com/CrowdStrike/falconpy/blob/main/src/falconpy/discover.py#L114 and was planning to use limit and offset to get all of the hosts back with paging. However, if we have 10000 hosts then I can't seem to figure out the proper way to get them all back. I see the response here, #536, I am just trying to see if this would be an equivalent solution for this endpoint. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hi @LarsenEric thanks for the question! Yes the refrenced sample here shows the usage of the Let us know if you have any questions on it's usage.! |
Beta Was this translation helpful? Give feedback.
-
Could the difference be related to wether or not they are managed assets? |
Beta Was this translation helpful? Give feedback.
Ah my apoligies, misread your original question you are using the Discover operations, ignore all I said about
query_devices_by_filter_scroll
😄With the Discover operations you'll use limit+offset as you mentioned and the sum of which cannot be greater than 10000 records. So we have to get a bit creative to pull all the records.
To get around this limitation I reccomend using a
filter
to reduce the total count below 10000. Based on your environment there may be a few different options for this filter, these are outlined hereFor my usage I used a last_seen_timestamp and the polling logic goes something like this
filter
and paginate through all records. Additi…