fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Allow setting populate_software=false when getting a host by identifier

Open Patagonia121 opened this issue 1 year ago • 4 comments

The software inventory in Fleet can create a poor user experience if there's a customer that has to scroll through a bunch of raw results, so using something like GET /api/v1/fleet/hosts/identifier/392547dc-0000-0000-a87a-d701ff75bc65?populate_software=false would make this much easier.

Patagonia121 avatar Jun 05 '24 18:06 Patagonia121

Hey @Patagonia121! Thanks for tracking this.

The software inventory in Fleet can create a poor user experience if there's a customer that has to scroll through a bunch of raw results

When you get the chance, can you please help dig into this? What workflow exactly is the customer trying to do?

Example workflow (Noah's guess): As the customer, I'm calling the GET /hosts/identifier:identifier API endpoint in Postman and looking at the response to try to find this host's last seen_time. This is painful because I have to scroll past the software array to see seen_time.

Note that this workflow includes not only the workflow but the tool the customer is using.

Maybe we can ask the customer to follow up in this issue?

noahtalerman avatar Jun 06 '24 13:06 noahtalerman

Related issues:

  • Fix for #19348 added exclude_software to /api/latest/hosts/:id endpoint.
  • #19618 should add exclude_software to device/:identifier endpoint.

getvictor avatar Jun 11 '24 18:06 getvictor

@noahtalerman - I reached out to the customer and will update once they respond (also shared your comment with them).

Patagonia121 avatar Jun 11 '24 21:06 Patagonia121

@jamesfkane has an open PR on this. @jamesfkane can you provide a bit of info on what makes this feature useful to you?

CC: @noahtalerman

mostlikelee avatar Jul 09 '24 16:07 mostlikelee

@noahtalerman Sending this to product board for review because we received a community PR that addresses it.

lukeheath avatar Jul 09 '24 16:07 lukeheath

Sounds like you already have what you need, but to add, when building automations using the GET /api/v1/fleet/hosts/identifier/:identifier endpoint and potentially looping through thousands of devices where the use case doesn't require software details, the option to exclude it significantly reduces the data in each response.

jamesfkane avatar Jul 09 '24 16:07 jamesfkane

Thanks @jamesfkane!

When you get the chance, can you please update the REST API docs in your PR?

It looks like we want to update the "Parameters" table for the "Get host by identifier" endpoint in the REST API docs to include the new parameter: https://fleetdm.com/docs/rest-api/rest-api#parameters28

noahtalerman avatar Jul 09 '24 20:07 noahtalerman

@lukeheath heads up, I updated this issue to user story and assigned it to @rachaelshaw (API design DRI)

Rachael, when you get the chance can you please take a look at the proposed API changes? If they look good to go, can you please move this story to the release board and assign @sharon-fdm so that it can be QA'd? Thanks!

noahtalerman avatar Jul 09 '24 20:07 noahtalerman

✅ Approved the API change — it's consistent with what we currently have for Get host

rachaelshaw avatar Jul 09 '24 21:07 rachaelshaw

@sharon-fdm heads up, I pulled this off of the drafting board (:product). Rachael moved it to the release board.

cc @lukeheath

noahtalerman avatar Jul 10 '24 14:07 noahtalerman

@noahtalerman is it a P2 for next sprint? If so, should we not keep it high on the product board (with P2)?

sharon-fdm avatar Jul 10 '24 14:07 sharon-fdm

Hey team! Please add your planning poker estimate with Zenhub @getvictor @jacobshandling @lucasmrod @mostlikelee @RachelElysia

sharon-fdm avatar Jul 10 '24 18:07 sharon-fdm

is it a P2 for next sprint? If so, should we not keep it high on the product board (with P2)?

Hey @sharon-fdm! Not a P2.

My understanding, based on @lukeheath's proposed process for community PRs here in Slack (internal) is that we'd pull it into the current sprint.

noahtalerman avatar Jul 10 '24 21:07 noahtalerman

@noahtalerman, NP. We can assign next sprint.

sharon-fdm avatar Jul 11 '24 14:07 sharon-fdm

Hey @Patagonia121 heads up that this customer request was shipped in 4.55 🚀

noahtalerman avatar Aug 16 '24 20:08 noahtalerman

Excluding software, API response streamlined, Ease in host's seen time.

fleet-release avatar Aug 16 '24 20:08 fleet-release