2021-09-14 13:58:48 +00:00
|
|
|
package service
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/fleetdm/fleet/v4/server/fleet"
|
|
|
|
)
|
|
|
|
|
|
|
|
// ListSoftware retrieves the software running across hosts.
|
2022-07-19 21:11:51 +00:00
|
|
|
func (c *Client) ListSoftware(query string) ([]fleet.Software, error) {
|
2022-04-05 15:35:53 +00:00
|
|
|
verb, path := "GET", "/api/latest/fleet/software"
|
2021-09-14 13:58:48 +00:00
|
|
|
var responseBody listSoftwareResponse
|
|
|
|
err := c.authenticatedRequestWithQuery(nil, verb, path, &responseBody, query)
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return responseBody.Software, nil
|
|
|
|
}
|