mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
## Summary This PR creates the bulk get cases internal API. The endpoint is needed for the alerts table to be able to get all cases the alerts are attached to with one call. Reference: https://github.com/elastic/kibana/issues/146864 ### Request - ids: (Required, array) An array of IDs of the retrieved cases. - fields: (Optional, array) The fields to return in the attributes key of the object response. ``` POST <kibana host>:<port>/internal/cases/_bulk_get { "ids": ["case-id-1", "case-id-2", "123", "not-authorized"], "fields": ["title"] } ``` ### Response ``` { "cases": [ { "title": "case1", "owner": "securitySolution", "id": "case-id-1", "version": "WzIzMTU0NSwxNV0=" }, { "title": "case2", "owner": "observability", "id": "case-id-2", "version": "WzIzMTU0NSwxNV0=" } ], "errors": [ { "error": "Not Found", "message": "Saved object [cases/123] not found", "status": 404, "caseId": "123" }, { "error": "Forbidden", "message": "Unauthorized to access case with owner: \"cases\"", "status": 403, "caseId": "not-authorized" } ] } ``` ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) |
||
---|---|---|
.. | ||
api | ||
api-generated | ||
apm | ||
canvas | ||
concepts | ||
dev-tools | ||
developer | ||
development/plugins/expressions/public | ||
discover | ||
fleet | ||
getting-started | ||
management | ||
maps | ||
migration | ||
observability | ||
osquery | ||
settings | ||
setup | ||
siem | ||
spaces | ||
user | ||
accessibility.asciidoc | ||
action-type-template.asciidoc | ||
apis.asciidoc | ||
CHANGELOG.asciidoc | ||
gs-index.asciidoc | ||
index-custom-title-page.html | ||
index.asciidoc | ||
index.x.asciidoc | ||
limitations.asciidoc | ||
migration.asciidoc | ||
redirects.asciidoc | ||
rule-type-template.asciidoc | ||
template.asciidoc |