-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fleet] Make API responses consistent #119494
Conversation
Pinging @elastic/fleet (Team:Fleet) |
page: number; | ||
perPage: number; | ||
kuery?: string; | ||
query: ListWithKuery & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a slight difference here as page
and perPage
are optional in ListWithKuery
, hopefully not a problem. I feel it's still better to use the common interface.
I do not think we can make that change without breaking the agent setup on cloud. Elastic agent on cloud is calling the setup API and this API to get enrollemtn tokens https://github.com/elastic/beats/blob/15366ffee58fe2012daf524a7845026011faf4a1/x-pack/elastic-agent/pkg/agent/cmd/container.go#L453 |
@nchaulet thanks for pointing this out! should I updated in beats repo? |
I think it will make sense to create an issue in the beats repo to see how the migration could work, I am not sure what retro compatibility we should keep here |
@nchaulet raised this: elastic/elastic-agent#111 |
I think that this should be labeled as |
@elasticmachine merge upstream |
expected head sha didn’t match current head ref. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for the fleet changes 👍
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
💛 Build succeeded, but was flaky
Test Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
* make apis consistent * UI and test fixes * test fixes * fixed test * fix tests * fix test * removed deprecated shared_id from openapi spec * added back list prop as deprecated * renamed apis with hyphens * openapi update * fix checks * fix test * renamed epm api path and response * fix tests * fix ml * moved splitPkgKey * fixed edit package policy page * fixed storybook * fix prettier after conflict * fix tests * fix tests * fix tests * fix test * fix test * added back semver validation * fix test * pkgVersion optional * fix tests Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
* [Fleet] Make API responses consistent (#119494) * make apis consistent * UI and test fixes * test fixes * fixed test * fix tests * fix test * removed deprecated shared_id from openapi spec * added back list prop as deprecated * renamed apis with hyphens * openapi update * fix checks * fix test * renamed epm api path and response * fix tests * fix ml * moved splitPkgKey * fixed edit package policy page * fixed storybook * fix prettier after conflict * fix tests * fix tests * fix tests * fix test * fix test * added back semver validation * fix test * pkgVersion optional * fix tests Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> * fixed tests Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com> Co-authored-by: Julia Bardi <julia.bardi@elastic.co>
* make apis consistent * UI and test fixes * test fixes * fixed test * fix tests * fix test * removed deprecated shared_id from openapi spec * added back list prop as deprecated * renamed apis with hyphens * openapi update * fix checks * fix test * renamed epm api path and response * fix tests * fix ml * moved splitPkgKey * fixed edit package policy page * fixed storybook * fix prettier after conflict * fix tests * fix tests * fix tests * fix test * fix test * added back semver validation * fix test * pkgVersion optional * fix tests Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* make apis consistent * UI and test fixes * test fixes * fixed test * fix tests * fix test * removed deprecated shared_id from openapi spec * added back list prop as deprecated * renamed apis with hyphens * openapi update * fix checks * fix test * renamed epm api path and response * fix tests * fix ml * moved splitPkgKey * fixed edit package policy page * fixed storybook * fix prettier after conflict * fix tests * fix tests * fix tests * fix test * fix test * added back semver validation * fix test * pkgVersion optional * fix tests Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
Fixes #119182
Making Fleet API GET responses consistent, so that they all return
items
:/api/fleet/enrollment-api-keys
/api/fleet/agents
Updated openapi spec.
EDIT: as discussed it is a kibana convention to use underscore. Updated following APIs to underscore and deprecated old ones:
enrollment-api-keys
toenrollment_api_keys
agent-status
toagent_status
service-tokens
toservice_tokens
Note:
check-permissions
will be removed anyway, so not worth changing that.EDIT:
further changes for consistency:
changing
/epm/packages/{pkgkey}
endpoint to/epm/packages/{packageName}/{version}
changing
response[]
toitems[]
oritem
here:For maintainers