Title
#fleet
d

demonbhao

04/09/2021, 10:42 AM
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
zwass

zwass

04/09/2021, 3:57 PM
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

demonbhao

04/12/2021, 3:27 AM
OK, thank you for your answer👍
9:39 AM
Hi,I haven't used the Go or JS API. What's the best way to implement it in Python?
9:42 AM
In addition, I saw in the document that the websocket should be changed to websockets?
12:15 PM
I want to use it simply, but I can't connect to the websocket
11:44 AM
Hello, may I ask if you have time to check the problems of websocket and websockets? Thank you very much
zwass

zwass

04/13/2021, 3:14 PM
You'll need to look into the network tab to see what went wrong there
3:14 PM
Make sure you have a look at how it looks in the network tab when the Fleet UI does it.
d

demonbhao

04/15/2021, 10:34 AM
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

demonbhao

04/19/2021, 5:41 AM
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