fleet
fleet copied to clipboard
List labels API: remove `host_ids` field
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
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
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.
Fro Victor: Try to reproduce with manual labels.
@mna your comment implies that we may want to include these host_id
s in the future. Is that the case? If so, maybe it's not a good idea to remove the field altogether.
@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
Null field in the code, Fleet streamlines with grace and ease, Clarity takes root.