Hello, how can I retrieve a list with all my hosts...
# fleet
e
Hello, how can I retrieve a list with all my hosts along with the software installed and vulnerabilities?. Not the default Software tab but to have a list with HOST / VULNERABILITIES
m
Could use the “get hosts” API. @Eric Shaw something similar in a dashboard recently
e
Cool, can you give me an example or the link to Eric's approach?
m
Up to Eric, rest api docs are under fleetdm.com/docs/using-fleet Separately, so it’s easier to find, could you make an issue with a napkin drawing of what report you’re looking for? Along the lines of https://osquery.slack.com/archives/C01DXJL16D8/p1686856086230449?thread_ts=1686855560.126309&channel=C01DXJL16D8&message_ts=1686856086.230449 (but separate issue) That way you and Eric can pick it up there. He’s @eashaw on GitHub
e
I can't create the Issue rn but i've sent an example o f the output i want to my last message
e
Hi @Esteban, you can collect the information you need to create a CSV by sending requests to the “list hosts” and “get host” API endpoints of the Fleet instance. To accomplish this, I recommend: 1. Send a request to the list hosts endpoint to get an array of all hosts. 2. Send a request to the “get host” API for each host returned in the response from the “list hosts” API (The “get host” API response includes the software installed on each host.) 3. Use the information from the “get host” endpoint to create a CSV