Skip to content

[Security Solution] Improve bulk actions API reference docs#228712

Merged
maximpn merged 5 commits intoelastic:mainfrom
maximpn:explain-ids-in-api-reference-docs
Jul 28, 2025
Merged

[Security Solution] Improve bulk actions API reference docs#228712
maximpn merged 5 commits intoelastic:mainfrom
maximpn:explain-ids-in-api-reference-docs

Conversation

@maximpn
Copy link
Contributor

@maximpn maximpn commented Jul 21, 2025

Summary

This PR improves description on rule bulk action ids to make it clear rule's saved object ID is used.

@maximpn maximpn self-assigned this Jul 21, 2025
@maximpn maximpn added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Detection Rule Management Security Detection Rule Management Team backport:version Backport to applied version labels v8.18.0 v9.1.0 v8.19.0 v9.2.0 labels Jul 21, 2025
@maximpn maximpn added the Feature:Rule Management Security Solution Detection Rule Management area label Jul 21, 2025
@maximpn maximpn marked this pull request as ready for review July 21, 2025 06:49
@maximpn maximpn requested a review from a team as a code owner July 21, 2025 06:49
@maximpn maximpn requested a review from jkelas July 21, 2025 06:49
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

ids:
description: Array of rule IDs. Array of rule IDs to which a bulk action will be applied. Only valid when query property is undefined.
description: |
Array of saved object rule IDs to which a bulk action will be applied. Rule signature ID `rule_id` is supported.

Choose a reason for hiding this comment

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

@maximpn what do you mean by signature?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since every rule may have two distinct unique identifiers id and rule_id we distinguish them as Saved Object Identifier and Rule Signature Identifier. The latter came from prebuilt rules but custom rules have it anyway. In the codebase multiple functions accept an id/ids and it's hard to say whether id or rule_id identifier should be provided. So we came up with RuleObjectId and RuleSignatureId types to distinguish between these two. For example export rules API endpoint uses a list of rule_id to export specific rule and rule signature is mentioned there.

The problem in the documentation is that rule id and rule_id might be really confusing. The first one means Saved Object ID and the second one means Rule Signature ID. Unfortunately it's not clear from our API reference documentation.

@approksiu Do you think we should stick to some better name or omit rule signature mention from the API reference docs?

Choose a reason for hiding this comment

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

Better to omit if possible, could we phrase like "use rule_id field"? We could add that it corresponds to the unique rule identifier across all rules.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@approksiu,

I've adjusted the texts to be

  • bulk actions
Array of rule `id`s to which a bulk action will be applied. Do not use rule's `rule_id` here. Only valid when query property is undefined.
  • rules export
Array of objects with a rule's `rule_id` field. Do not use rule's `id` here. Exports all rules when unspecified.

Does it look good for you?

Choose a reason for hiding this comment

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

Yes, thank you!

@maximpn maximpn force-pushed the explain-ids-in-api-reference-docs branch from d5d3ac3 to 1f87fa1 Compare July 21, 2025 10:46
Copy link
Contributor

@jkelas jkelas left a comment

Choose a reason for hiding this comment

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

Changes LGTM, approving.

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

cc @maximpn

@maximpn maximpn merged commit 642f6b3 into elastic:main Jul 28, 2025
12 checks passed
@maximpn maximpn deleted the explain-ids-in-api-reference-docs branch July 28, 2025 21:33
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.18, 8.19, 9.0, 9.1

https://github.com/elastic/kibana/actions/runs/16580843090

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 28, 2025
…228712)

## Summary

This PR improves description on rule bulk action `ids` to make it clear rule's saved object ID is used.

(cherry picked from commit 642f6b3)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 28, 2025
…228712)

## Summary

This PR improves description on rule bulk action `ids` to make it clear rule's saved object ID is used.

(cherry picked from commit 642f6b3)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.18 Backport failed because of merge conflicts
8.19
9.0 Backport failed because of merge conflicts

You might need to backport the following PRs to 9.0:
- [Fleet] When removing a inputs type package policy, clean up assets (#218582)
9.1

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 228712

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jul 28, 2025
…28712) (#229720)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Security Solution] Improve bulk actions API reference docs
(#228712)](#228712)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Maxim
Palenov","email":"maxim.palenov@elastic.co"},"sourceCommit":{"committedDate":"2025-07-28T21:33:13Z","message":"[Security
Solution] Improve bulk actions API reference docs (#228712)\n\n##
Summary\n\nThis PR improves description on rule bulk action `ids` to
make it clear rule's saved object ID is
used.","sha":"642f6b328be19a4e542a57c9cdfd6874e6c5978d","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Feature:Rule
Management","Team:Detection Rule
Management","backport:version","v8.18.0","v9.1.0","v8.19.0","v9.2.0"],"title":"[Security
Solution] Improve bulk actions API reference
docs","number":228712,"url":"https://github.com/elastic/kibana/pull/228712","mergeCommit":{"message":"[Security
Solution] Improve bulk actions API reference docs (#228712)\n\n##
Summary\n\nThis PR improves description on rule bulk action `ids` to
make it clear rule's saved object ID is
used.","sha":"642f6b328be19a4e542a57c9cdfd6874e6c5978d"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","9.1","8.19"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228712","number":228712,"mergeCommit":{"message":"[Security
Solution] Improve bulk actions API reference docs (#228712)\n\n##
Summary\n\nThis PR improves description on rule bulk action `ids` to
make it clear rule's saved object ID is
used.","sha":"642f6b328be19a4e542a57c9cdfd6874e6c5978d"}}]}] BACKPORT-->

Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
kibanamachine added a commit that referenced this pull request Jul 28, 2025
…228712) (#229719)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Security Solution] Improve bulk actions API reference docs
(#228712)](#228712)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Maxim
Palenov","email":"maxim.palenov@elastic.co"},"sourceCommit":{"committedDate":"2025-07-28T21:33:13Z","message":"[Security
Solution] Improve bulk actions API reference docs (#228712)\n\n##
Summary\n\nThis PR improves description on rule bulk action `ids` to
make it clear rule's saved object ID is
used.","sha":"642f6b328be19a4e542a57c9cdfd6874e6c5978d","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Feature:Rule
Management","Team:Detection Rule
Management","backport:version","v8.18.0","v9.1.0","v8.19.0","v9.2.0"],"title":"[Security
Solution] Improve bulk actions API reference
docs","number":228712,"url":"https://github.com/elastic/kibana/pull/228712","mergeCommit":{"message":"[Security
Solution] Improve bulk actions API reference docs (#228712)\n\n##
Summary\n\nThis PR improves description on rule bulk action `ids` to
make it clear rule's saved object ID is
used.","sha":"642f6b328be19a4e542a57c9cdfd6874e6c5978d"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","9.1","8.19"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228712","number":228712,"mergeCommit":{"message":"[Security
Solution] Improve bulk actions API reference docs (#228712)\n\n##
Summary\n\nThis PR improves description on rule bulk action `ids` to
make it clear rule's saved object ID is
used.","sha":"642f6b328be19a4e542a57c9cdfd6874e6c5978d"}}]}] BACKPORT-->

Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
maximpn added a commit to maximpn/kibana that referenced this pull request Jul 30, 2025
…228712)

## Summary

This PR improves description on rule bulk action `ids` to make it clear rule's saved object ID is used.

(cherry picked from commit 642f6b3)

# Conflicts:
#	oas_docs/output/kibana.serverless.yaml
#	oas_docs/output/kibana.yaml
#	x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.schema.yaml
#	x-pack/solutions/security/plugins/security_solution/docs/openapi/ess/security_solution_detections_api_2023_10_31.bundled.schema.yaml
#	x-pack/solutions/security/plugins/security_solution/docs/openapi/serverless/security_solution_detections_api_2023_10_31.bundled.schema.yaml
maximpn added a commit to maximpn/kibana that referenced this pull request Jul 30, 2025
…228712)

## Summary

This PR improves description on rule bulk action `ids` to make it clear rule's saved object ID is used.

(cherry picked from commit 642f6b3)

# Conflicts:
#	oas_docs/output/kibana.serverless.yaml
#	oas_docs/output/kibana.yaml
#	x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.schema.yaml
#	x-pack/solutions/security/plugins/security_solution/docs/openapi/ess/security_solution_detections_api_2023_10_31.bundled.schema.yaml
#	x-pack/solutions/security/plugins/security_solution/docs/openapi/serverless/security_solution_detections_api_2023_10_31.bundled.schema.yaml
@maximpn
Copy link
Contributor Author

maximpn commented Jul 30, 2025

💚 All backports created successfully

Status Branch Result
9.0
8.18

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jul 30, 2025
@kibanamachine
Copy link
Contributor

Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync.
cc: @maximpn

maximpn added a commit that referenced this pull request Jul 31, 2025
…28712) (#229992)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Security Solution] Improve bulk actions API reference docs
(#228712)](#228712)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Maxim
Palenov","email":"maxim.palenov@elastic.co"},"sourceCommit":{"committedDate":"2025-07-28T21:33:13Z","message":"[Security
Solution] Improve bulk actions API reference docs (#228712)\n\n##
Summary\n\nThis PR improves description on rule bulk action `ids` to
make it clear rule's saved object ID is
used.","sha":"642f6b328be19a4e542a57c9cdfd6874e6c5978d","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Feature:Rule
Management","Team:Detection Rule
Management","backport:version","v8.18.0","v9.2.0","v9.1.1","v8.19.1"],"title":"[Security
Solution] Improve bulk actions API reference
docs","number":228712,"url":"https://github.com/elastic/kibana/pull/228712","mergeCommit":{"message":"[Security
Solution] Improve bulk actions API reference docs (#228712)\n\n##
Summary\n\nThis PR improves description on rule bulk action `ids` to
make it clear rule's saved object ID is
used.","sha":"642f6b328be19a4e542a57c9cdfd6874e6c5978d"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228712","number":228712,"mergeCommit":{"message":"[Security
Solution] Improve bulk actions API reference docs (#228712)\n\n##
Summary\n\nThis PR improves description on rule bulk action `ids` to
make it clear rule's saved object ID is
used.","sha":"642f6b328be19a4e542a57c9cdfd6874e6c5978d"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/229720","number":229720,"state":"MERGED","mergeCommit":{"sha":"055164ffbfafe4e5d0036a5fb02c0de708278e40","message":"[9.1]
[Security Solution] Improve bulk actions API reference docs (#228712)
(#229720)\n\n# Backport\n\nThis will backport the following commits from
`main` to `9.1`:\n- [[Security Solution] Improve bulk actions API
reference
docs\n(#228712)](https://github.com/elastic/kibana/pull/228712)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Maxim Palenov
<maxim.palenov@elastic.co>"}},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/229719","number":229719,"state":"MERGED","mergeCommit":{"sha":"318e91ad64bd45623693add648026170033ea142","message":"[8.19]
[Security Solution] Improve bulk actions API reference docs (#228712)
(#229719)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.19`:\n- [[Security Solution] Improve bulk actions API
reference
docs\n(#228712)](https://github.com/elastic/kibana/pull/228712)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Maxim Palenov <maxim.palenov@elastic.co>"}}]}] BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
maximpn added a commit that referenced this pull request Jul 31, 2025
…228712) (#229993)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[Security Solution] Improve bulk actions API reference docs
(#228712)](#228712)

<!--- Backport version: 10.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Maxim
Palenov","email":"maxim.palenov@elastic.co"},"sourceCommit":{"committedDate":"2025-07-28T21:33:13Z","message":"[Security
Solution] Improve bulk actions API reference docs (#228712)\n\n##
Summary\n\nThis PR improves description on rule bulk action `ids` to
make it clear rule's saved object ID is
used.","sha":"642f6b328be19a4e542a57c9cdfd6874e6c5978d","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Feature:Rule
Management","Team:Detection Rule
Management","backport:version","v8.18.0","v9.2.0","v9.1.1","v8.19.1"],"title":"[Security
Solution] Improve bulk actions API reference
docs","number":228712,"url":"https://github.com/elastic/kibana/pull/228712","mergeCommit":{"message":"[Security
Solution] Improve bulk actions API reference docs (#228712)\n\n##
Summary\n\nThis PR improves description on rule bulk action `ids` to
make it clear rule's saved object ID is
used.","sha":"642f6b328be19a4e542a57c9cdfd6874e6c5978d"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/228712","number":228712,"mergeCommit":{"message":"[Security
Solution] Improve bulk actions API reference docs (#228712)\n\n##
Summary\n\nThis PR improves description on rule bulk action `ids` to
make it clear rule's saved object ID is
used.","sha":"642f6b328be19a4e542a57c9cdfd6874e6c5978d"}},{"branch":"9.1","label":"v9.1.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/229720","number":229720,"state":"MERGED","mergeCommit":{"sha":"055164ffbfafe4e5d0036a5fb02c0de708278e40","message":"[9.1]
[Security Solution] Improve bulk actions API reference docs (#228712)
(#229720)\n\n# Backport\n\nThis will backport the following commits from
`main` to `9.1`:\n- [[Security Solution] Improve bulk actions API
reference
docs\n(#228712)](https://github.com/elastic/kibana/pull/228712)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Maxim Palenov
<maxim.palenov@elastic.co>"}},{"branch":"8.19","label":"v8.19.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/229719","number":229719,"state":"MERGED","mergeCommit":{"sha":"318e91ad64bd45623693add648026170033ea142","message":"[8.19]
[Security Solution] Improve bulk actions API reference docs (#228712)
(#229719)\n\n# Backport\n\nThis will backport the following commits from
`main` to `8.19`:\n- [[Security Solution] Improve bulk actions API
reference
docs\n(#228712)](https://github.com/elastic/kibana/pull/228712)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n\n\nCo-authored-by:
Maxim Palenov <maxim.palenov@elastic.co>"}}]}] BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine kibanamachine added v8.18.5 and removed backport missing Added to PRs automatically when the are determined to be missing a backport. labels Jul 31, 2025
delanni pushed a commit to delanni/kibana that referenced this pull request Aug 5, 2025
…228712)

## Summary

This PR improves description on rule bulk action `ids` to make it clear rule's saved object ID is used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels Feature:Rule Management Security Solution Detection Rule Management area release_note:skip Skip the PR/issue when compiling release notes Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.18.5 v8.19.1 v9.0.5 v9.1.1 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants