Skip to content
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] Runtime fields CRUD REST API #101164

Merged
merged 8 commits into from
Jun 9, 2021

Conversation

Dosant
Copy link
Contributor

@Dosant Dosant commented Jun 2, 2021

Summary

close #92126

Mostly follows scripted fields REST API structure.

  • Create a new runtime field — POST /api/index_patterns/index_pattern/{id}/runtime_field
  • Get a runtime field — GET /api/index_patterns/index_pattern/{id}/runtime_field/{name}
  • Update a an existing runtime field — POST /api/index_patterns/index_pattern/{id}/runtime_field/{name}
  • Upsert a runtime field — PUT /api/index_patterns/index_pattern/{id}/runtime_field
  • Delete a runtime field — DELETE /api/index_patterns/index_pattern/{id}/runtime_field/{name}

TODO

  • User facing docs
  • Do we want this API to support updating customLabel, fieldFormatters, and popularity? Or separate field API should work for now. - to keep API surface minimal, recommend updating those using separate existing API endpoint. Added integration test to make sure it works in combination with new API
  • Want to learn more about isMapped. Also could it be that regular field is augmented by runtime field property? [Index Patterns] Runtime fields CRUD REST API  #101164 (comment)

Checklist

For maintainers

Release Notes

Adds runtime fields CRUD REST API

@Dosant Dosant requested a review from mattkime June 2, 2021 16:15
@mattkime
Copy link
Contributor

mattkime commented Jun 3, 2021

isMapped exists to tell the difference between shadow runtime fields and regular runtime fields. That said, shadow runtime fields aren't implemented yet.

@Dosant Dosant marked this pull request as ready for review June 8, 2021 16:17
@Dosant Dosant requested a review from a team as a code owner June 8, 2021 16:17
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@Dosant Dosant requested a review from mattkime June 8, 2021 16:18
Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, thanks!

@Dosant
Copy link
Contributor Author

Dosant commented Jun 9, 2021

@elasticmachine merge upstream

@Dosant Dosant enabled auto-merge (squash) June 9, 2021 10:13
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
data 3257 3266 +9

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
data 839.7KB 840.0KB +364.0B
Unknown metric groups

API count

id before after diff
data 3809 3827 +18

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@Dosant Dosant merged commit edc5251 into elastic:master Jun 9, 2021
Dosant added a commit to Dosant/kibana that referenced this pull request Jun 9, 2021
Part of index pattern REST API
# Conflicts:
#	docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md
#	docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.md
Dosant added a commit that referenced this pull request Jun 9, 2021
* [Index Patterns] Runtime fields CRUD REST API  (#101164)

Part of index pattern REST API
# Conflicts:
#	docs/development/plugins/data/public/kibana-plugin-plugins-data-public.indexpattern.md
#	docs/development/plugins/data/server/kibana-plugin-plugins-data-server.indexpattern.md

* fix bad docs merge
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jun 9, 2021
* master:
  clarify which parts of TM are experimental (elastic#101757)
  Add sh scripts with _bulk_action route usage examples (elastic#101736)
  [Uptime] Only register route in side nav if uptime show capability is true (elastic#101709)
  Use KIBANA_DOCS in doc link service (elastic#101667)
  [Alerting][Event log] Persisting duration information for active alerts in event log (elastic#101387)
  Address design issues in Discover/Graph (elastic#101584)
  Optimize performance for document table (elastic#101715)
  Change file data visualizer links to point to new location in home application (elastic#101393)
  [Fleet] Tighten policy permissions, take II (elastic#97366)
  [ML] Add debounce to the severity control update  (elastic#101581)
  [Fleet] Fix routing issues with `getPath` and `history.push` (elastic#101658)
  [APM] Add link-to/transaction route (elastic#101731)
  [Index Patterns] Runtime fields CRUD REST API  (elastic#101164)
  [ILM] Refactor types and fix missing aria labels (elastic#101518)
  [Lens] New summary row feature for datatable (elastic#101075)
  Blocks save event filter with a white space name (elastic#101599)
  Improve security server types (elastic#101661)
  [APM] Replace side nav with tabs on Settings page (elastic#101460)
  [APM] Only register items in side nav if user has permissions to see app (elastic#101707)
  [Security solution][Endpoint] Add back button when to the event filters list (elastic#101280)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Data Views Data Views code and UI - index patterns before 8.0 release_note:enhancement v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Index patterns - REST api for runtime field CRUD operations
4 participants