Skip to content

There is no parent module to import from #512

Discussion options

You must be logged in to vote

Follow up: here's a basic example for retrieving hosts identified by Discover.

from falconpy import Discover

discover = Discover(client_id="API_ID_HERE", client_secret="API_SECRET_HERE")

# Limit can be adjusted up to the maximum of 100
hosts_found = discover.query_hosts(limit=20)

# Maximum number of ids that can be retrieved is also 100
host_details = discover.get_hosts(ids=hosts_found["body"]["resources"])

for host in host_details["body"]["resources"]:
    display = "Hostname / IP not found"
    if "local_ip" in host:
        display = host["local_ip"]
    if "hostname" in host:
        display = host["hostname"]
    print(display)

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jshcodes
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
documentation 📖 Improvements or additions to documentation Discover Discover or Discover for Cloud issues and questions SDK usage General SDK usage issues and questions
2 participants
Converted from issue

This discussion was converted from issue #511 on January 11, 2022 16:15.