Skip to content

[ResponseOps][Rules] Map rule actions params as flattened to allow search#246123

Merged
umbopepato merged 11 commits intoelastic:mainfrom
umbopepato:339-rules-find-flattened-action-params
Dec 15, 2025
Merged

[ResponseOps][Rules] Map rule actions params as flattened to allow search#246123
umbopepato merged 11 commits intoelastic:mainfrom
umbopepato:339-rules-find-flattened-action-params

Conversation

@umbopepato
Copy link
Member

@umbopepato umbopepato commented Dec 12, 2025

📄 Summary

  • Maps the rule (once called alert) SO actions.params field as flattened to allow searching by action params

Important

This currently only supports searching by actions.params as a whole (i.e. in all leaf values of the params object). Support for deeply nested search (actions.params.param) will be added in a separate PR

🧪 Verification steps

  1. Create one or more rules with actions (i.e. email)
  2. From the devtools, run the rules find API searching by any action param value:
GET kbn:/api/alerting/rules/_find?search=youractionparamvaluehere&search_fields=actions.params
  1. Check that the search results match your search criteria

⏪ Backport rationale

Not backporting since this is an enhancement

🔗 References

Closes https://github.com/elastic/response-ops-team/issues/339

Release Notes

Adds support for searching rules by their actions' params via API

☑️ Checklist

  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.
@umbopepato umbopepato added Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v9.3.0 backport:skip This PR does not require backporting release_note:enhancement labels Dec 12, 2025
@umbopepato umbopepato marked this pull request as ready for review December 12, 2025 11:27
@umbopepato umbopepato requested review from a team as code owners December 12, 2025 11:27
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

Copy link
Member

@cnasikas cnasikas left a comment

Choose a reason for hiding this comment

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

LGMT!

@umbopepato
Copy link
Member Author

Re. this: we're not adding any new SO fields, just adding mappings for the pre-existing actions.params property so I added fixtures with two identical rules, specifying actions unlike we did for the last migration file that was created for rules

@umbopepato umbopepato requested a review from a team as a code owner December 12, 2025 17:09
@cnasikas
Copy link
Member

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

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
alerting 833 835 +2

Page load bundle

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

id before after diff
alerting 24.2KB 24.2KB +26.0B
Unknown metric groups

API count

id before after diff
alerting 872 874 +2

History

@umbopepato umbopepato merged commit 301adc3 into elastic:main Dec 15, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:enhancement Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v9.3.0

6 participants