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
Recommendations
- 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.
- 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 · ◷
https://www.elastic.co/docs/api/doc/kibana/operation/operation-get-fleet-package-policies
explains to use the
Kuerybut 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_policiesmentions akueryquery 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 usesGetPackagePoliciesRequestSchemaas an imported object (rather than inlinevalidate.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), thekueryparameter 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.mdcovers several Fleet API examples but never explains thekuery/KQL filtering pattern, and existing KQL docs are available atexplore-analyze/query-filter/languages/kql.md.Request accuracy
Accurate — the Fleet API docs do not explain the
kueryparameter or link to KQL documentation.Next action for author
Update
fleet-api-docs.mdto add a section showing how to use thekueryparameter 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
Recommendations
reference/fleet/fleet-api-docs.mdwith a brief explanation that thekueryparameter accepts Kibana Query Language (KQL), a short example query (e.g., filtering by package name), and a link to the KQL reference.kueryparameter description appears in the auto-generated API reference (per lcawl's comment linking to the route schema difference).Notes
fleet-api-docs.mdis a how-to/examples page — adding a filtering section fits its existing role.reference/fleet/fleet-enrollment-tokens.mdpage already uses the patternKibana Query Language (KQL)with a link — use the same inline citation style for consistency.