Skip to content

[Feedback]: Kuery is nowhere described or explictily mapped or matched. #3401

Description

@philippkahr

https://www.elastic.co/docs/api/doc/kibana/operation/operation-get-fleet-package-policies

explains to use the Kuery but doesn't explain what it is, how it is used, what it needs to look like. Maybe there is some documentation somewhere, at the very least it should get back linked.


Elastic Docs AI Scoping 🤖

Docs issue scope

Summary

The issue reports that the Fleet API reference page for GET /api/fleet/package_policies mentions a kuery query parameter without explaining what it is or linking to any KQL documentation. Separately, the lcawl comment identifies that the root cause may be a Kibana code issue: the Fleet package policy route uses GetPackagePoliciesRequestSchema as an imported object (rather than inline validate.request.query), which may prevent the OpenAPI generator from emitting the query schema details — unlike the connector types route, which defines its query schema inline and generates full parameter docs.

In the Kibana source (x-pack/platform/plugins/shared/fleet/server/types/rest_spec/package_policy.ts), the kuery parameter is already described as "A KQL query string to filter results", so the description exists in code. Whether it surfaces in the generated API reference is the Kibana-side question. On the docs-content side, reference/fleet/fleet-api-docs.md covers several Fleet API examples but never explains the kuery/KQL filtering pattern, and existing KQL docs are available at explore-analyze/query-filter/languages/kql.md.

Request accuracy

Accurate — the Fleet API docs do not explain the kuery parameter or link to KQL documentation.

Next action for author

Update fleet-api-docs.md to add a section showing how to use the kuery parameter with a KQL example and a link to the KQL language docs; separately, confirm with the Kibana Core team (per lcawl's comment) whether a code fix is needed so the parameter description appears in the auto-generated API reference.

Impact: Medium

Scope boundary

No new pages needed; this is an addition to an existing Fleet API how-to page. The auto-generated API reference (/docs/api/doc/kibana) is out of scope for docs-content edits — any fix there requires a change in the Kibana source.

Recommended documentation targets

Page URL Action Impact Confidence Why this page?
Kibana Fleet APIs https://www.elastic.co/docs/reference/fleet/fleet-api-docs Add section to existing page Medium High Existing how-to page for Fleet API examples; currently has no filtering/kuery guidance
Kibana Query Language https://www.elastic.co/docs/explore-analyze/query-filter/languages/kql No action Low High Existing KQL reference to link to; no changes needed on this page

Recommendations

  1. Add a "Filter results with KQL" section to reference/fleet/fleet-api-docs.md with a brief explanation that the kuery parameter accepts Kibana Query Language (KQL), a short example query (e.g., filtering by package name), and a link to the KQL reference.
  2. As a secondary action, confirm with the Kibana Core team whether the Fleet package policy route needs a code change so the kuery parameter description appears in the auto-generated API reference (per lcawl's comment linking to the route schema difference).

Notes

  • fleet-api-docs.md is a how-to/examples page — adding a filtering section fits its existing role.
  • The KQL docs page already covers language syntax; no duplicate content is needed, just a cross-reference from the Fleet API page.
  • The reference/fleet/fleet-enrollment-tokens.md page already uses the pattern Kibana Query Language (KQL) with a link — use the same inline citation style for consistency.

Generated by Issue Scope Analyzer for issue #3401 · 187.4 AIC · ⌖ 18.2 AIC · ⊞ 29.3K ·

Metadata

Metadata

Labels

Team:DeveloperIssues owned by the Developer Docs Team

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions