-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Index patterns] Default index pattern REST API #100691
Conversation
Pinging @elastic/kibana-app-services (Team:AppServices) |
I'm not certain if there are clear advantages of doing this, perhaps you're aware of some. My first thoughts are we'd want to make sure we preserve type safety. |
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.
I think this still needs docs similar to https://github.com/elastic/kibana/pull/100549/files
👍 When I opened this one the docs pr hasn't been merged yet. Now since it has been merged I updated docs!
One practical benefit is that we would potentially reduce places where we have sequential networks calls from browser |
💚 Build Succeeded
Metrics [docs]Page load bundle
Unknown metric groupsAPI count
References to deprecated APIs
History
To update your PR or re-run it, just comment with: |
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.
looks good!
Summary
close #97337
Adds new routes for index patterns REST API.
I just mimicked the API of the existing index pattern service to keep things simpler.
Get the id of the default index pattern
returns index pattern id or
null
Set default index pattern by id if no currently set
Force default index pattern id using
force
modifierreturns
Please note: there is no validation that supplied index pattern id exists. This is done to give more flexibility when using the API.
Thoughts
@mattkime, Index pattern REST API uses
IndexPatternsService
which is acommon
service reused between client and server. Should we consider refactoring this in the future, so that the client-side service starts using REST API internally instead of saved object client directly?Checklist
For maintainers
Release Notes
Expose default index pattern management in index patterns REST API