Skip to content

#16413 API design: Add labels to queries API #26589

Merged
rachaelshaw merged 5 commits intodocs-v4.66.0from
16413-api-design
Feb 25, 2025
Merged

#16413 API design: Add labels to queries API #26589
rachaelshaw merged 5 commits intodocs-v4.66.0from
16413-api-design

Conversation

@rachaelshaw
Copy link
Copy Markdown
Member

Changes for #16413.

Comment thread docs/REST API/rest-api.md Outdated
@rachaelshaw rachaelshaw merged commit 92ca29d into docs-v4.66.0 Feb 25, 2025
@rachaelshaw rachaelshaw deleted the 16413-api-design branch February 25, 2025 17:42
jacobshandling pushed a commit that referenced this pull request Mar 12, 2025
For #26649 

# Checklist for submitter

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files)
for more information.

## Details

This PR adds the ability to select labels when saving or editing a query
in the UI, so that the query will only target hosts with those labels.
It follows the API design from
#26589, utilizing the
`labels_include_any` field. The expectation is that when creating or
updating a query, `labels_include_any` is an array of label names, and
when fetching a single query, `labels_include_any` is an array of
objects with a `name` and an `id` key.

As part of this work the `TargetLabelSelector` component is updated to
allow it to show a message in place of the dropdown when there are no
custom options (e.g. "include any", "include all", "exclude any") to
choose from.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants