fleet icon indicating copy to clipboard operation
fleet copied to clipboard

List labels API: remove `host_ids` field

Open marko-lisica opened this issue 10 months ago • 5 comments

Problem

Labels API

The "List" labels endpoints all show a host_ids field as part of the response payload in the documentation (e.g. https://fleetdm.com/docs/rest-api/rest-api#default-response60), but the field is always shown as null in the examples and there is no further documentation about what it should contain.

Up to now, this field has never been set in the code, so it was always returned as null.

More context here.

Potential solutions

Remove host_ids from " "List Labels" API endpoint, since it's not used.

Note: We want the host_ids to show on the Post/Update/Get /labels/:id endpoint

marko-lisica avatar Apr 24 '24 16:04 marko-lisica

Since this is a cleanup issue / technical change, I think we can treat this as an engineering initiated story.

Removing this issue from feature fest.

Heads up @lukeheath

noahtalerman avatar May 09 '24 17:05 noahtalerman

Thanks for filing this. I re-spec'd as a bug, because our documentation does not match our API response. I'd like to keep ~engineering-initiated to tickets filed by engineering.

lukeheath avatar May 09 '24 20:05 lukeheath

Fro Victor: Try to reproduce with manual labels.

sharon-fdm avatar May 13 '24 17:05 sharon-fdm

@mna your comment implies that we may want to include these host_ids in the future. Is that the case? If so, maybe it's not a good idea to remove the field altogether.

jacobshandling avatar May 21 '24 23:05 jacobshandling

@jacobshandling no, that was before filing this ticket that details the various ways it (didn't) work, I think removing them is a fine approach (no one ever complained that this was not filled!) and if we ever need them we can add it back. I think what's missing from this current ticket's specs is whether we want the host_ids to be filled for dynamic labels too (or just for manual ones). Referring to this:

We want the host_ids to show on the Post/Update/Get /labels/:id endpoint

mna avatar May 22 '24 13:05 mna

Null field in the code, Fleet streamlines with grace and ease, Clarity takes root.

fleet-release avatar May 30 '24 16:05 fleet-release