Open mikermcneil opened 2 weeks ago
As a user in the API, I want to do everything I can do in the UI, including (via one single API request) running a live query with arbitrary SQL against any of the hosts I can target with the query console's target picker.
@rachaelshaw do we already have this API?
@noahtalerman ad-hoc queries can only be run against 1 host at a time (https://fleetdm.com/docs/rest-api/rest-api#live-query-one-host-ad-hoc)
[CORE] As a user in the API, I want to do everything I can do in the UI, including (via one single API request) running a live query with arbitrary SQL against any of the hosts I can target with the query console's target picker.
Everything else in the API, which currently fails to follow through on Fleet's brand promise to do everything in the API that you can do in the UI. We set out to solve this 2 years ago, but upon reflection (and actually trying to write code using it in a new app for the 3rd time since then), the solution we built doesn't satisfactorily solve the problem.
More on the problem here: https://github.com/fleetdm/fleet/blob/5c3d324d3d6a05bfa5dcbba8a2afe7fe7c06e6e8/website/scripts/test-llm-generated-sql.js#L124-L128
Change this (or introduce a new API, if absolutely necessary) to support running arbitrary SQL over the API against multiple hosts in a single request.
https://fleetdm.com/docs/rest-api/rest-api#run-live-query
As a user of the API, I can send a single API request to send arbitrary SQL as a live query for a particular platform. (i.e. because at least then I can simultaneously run that on all 4 platforms at once, with slightly different SQL)
@mikermcneil: As a user in the API, I want to do everything I can do in the UI, including (via one single API request) running a live query with arbitrary SQL against any of the hosts I can target with the query console's target picker.