Hello, may I ask if there is an API interface for ...
# fleet
d
Hello, may I ask if there is an API interface for this query result?I want to call this interface directly to import the result content of the query into my database
z
Yes. Documented in https://github.com/fleetdm/fleet/blob/master/docs/1-Using-Fleet/3-REST-API.md#run-live-query and below sections. You can use the Go or JS API clients that
fleetctl
and the Fleet web UI use if you are working in either of those languages.
d
OK, thank you for your answer👍
Hi,I haven't used the Go or JS API. What's the best way to implement it in Python?
In addition, I saw in the document that the websocket should be changed to websockets?
I want to use it simply, but I can't connect to the websocket
Hello, may I ask if you have time to check the problems of websocket and websockets? Thank you very much
z
You'll need to look into the network tab to see what went wrong there
Make sure you have a look at how it looks in the network tab when the Fleet UI does it.
d
Hello, again for your trouble.I saw WebSocket on Fleet UI when I was queried online. I don't understand wss://hids-fleet.jpushoa.com/api/v1/fleet/results/437/q4ii0pxy/websocket here / 437 / q4il0pxy what meaning be
d
Thanks to Zwass for your help.I have solved the problem of connecting to Fleet WebSocket. The key is that the settings on my nginx need to be set to support WebSocket