# Backport
This will backport the following commits from `main` to `8.9`:
- [[DOCS] Clarify API key authorization for alerting
(#161717)](https://github.com/elastic/kibana/pull/161717)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2023-07-17T16:41:23Z","message":"[DOCS]
Clarify API key authorization for alerting
(#161717)","sha":"3a0c90d934c15f8cbe955eb91c7c0d587cb4a7b3","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Alerting","release_note:skip","Team:ResponseOps","docs","v8.9.0","v8.10.0","v8.8.3"],"number":161717,"url":"https://github.com/elastic/kibana/pull/161717","mergeCommit":{"message":"[DOCS]
Clarify API key authorization for alerting
(#161717)","sha":"3a0c90d934c15f8cbe955eb91c7c0d587cb4a7b3"}},"sourceBranch":"main","suggestedTargetBranches":["8.9","8.8"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/161717","number":161717,"mergeCommit":{"message":"[DOCS]
Clarify API key authorization for alerting
(#161717)","sha":"3a0c90d934c15f8cbe955eb91c7c0d587cb4a7b3"}},{"branch":"8.8","label":"v8.8.3","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
# Backport
This will backport the following commits from `main` to `8.9`:
- [[OAS] Add default spaces to case paths
(#160831)](https://github.com/elastic/kibana/pull/160831)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2023-06-29T15:41:58Z","message":"[OAS]
Add default spaces to case paths
(#160831)","sha":"8a1902c66eb1c5748a2300fd2e00f0a7b1bc5c76","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","docs","Feature:Cases","v8.9.0","v8.10.0"],"number":160831,"url":"https://github.com/elastic/kibana/pull/160831","mergeCommit":{"message":"[OAS]
Add default spaces to case paths
(#160831)","sha":"8a1902c66eb1c5748a2300fd2e00f0a7b1bc5c76"}},"sourceBranch":"main","suggestedTargetBranches":["8.9"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/160831","number":160831,"mergeCommit":{"message":"[OAS]
Add default spaces to case paths
(#160831)","sha":"8a1902c66eb1c5748a2300fd2e00f0a7b1bc5c76"}}]}]
BACKPORT-->
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
# Backport
This will backport the following commits from `main` to `8.9`:
- [[Security solution] Generative AI Connector API specification
(#158423)](https://github.com/elastic/kibana/pull/158423)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2023-06-27T22:03:36Z","message":"[Security
solution] Generative AI Connector API specification
(#158423)\n\nCo-authored-by: Steph Milovic
<stephanie.milovic@elastic.co>","sha":"418fbb1aa651d15b5a01a08528621bdd450b694a","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","docs","Feature:Actions/ConnectorTypes","backport:prev-minor","v8.9.0","v8.8.2","v8.10.0"],"number":158423,"url":"https://github.com/elastic/kibana/pull/158423","mergeCommit":{"message":"[Security
solution] Generative AI Connector API specification
(#158423)\n\nCo-authored-by: Steph Milovic
<stephanie.milovic@elastic.co>","sha":"418fbb1aa651d15b5a01a08528621bdd450b694a"}},"sourceBranch":"main","suggestedTargetBranches":["8.9","8.8"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.8","label":"v8.8.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/158423","number":158423,"mergeCommit":{"message":"[Security
solution] Generative AI Connector API specification
(#158423)\n\nCo-authored-by: Steph Milovic
<stephanie.milovic@elastic.co>","sha":"418fbb1aa651d15b5a01a08528621bdd450b694a"}}]}]
BACKPORT-->
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
# Backport
This will backport the following commits from `main` to `8.9`:
- [[DOCS] Fix create rule open API specification
(#157950)](https://github.com/elastic/kibana/pull/157950)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2023-06-26T14:39:11Z","message":"[DOCS]
Fix create rule open API specification
(#157950)","sha":"e38d08c91adb7305cb872afd5a37504d5b6c0848","branchLabelMapping":{"^v8.10.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Alerting","release_note:skip","Team:ResponseOps","docs","backport:prev-minor","v8.9.0","v8.8.1","v8.10.0"],"number":157950,"url":"https://github.com/elastic/kibana/pull/157950","mergeCommit":{"message":"[DOCS]
Fix create rule open API specification
(#157950)","sha":"e38d08c91adb7305cb872afd5a37504d5b6c0848"}},"sourceBranch":"main","suggestedTargetBranches":["8.9","8.8"],"targetPullRequestStates":[{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.8","label":"v8.8.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/157950","number":157950,"mergeCommit":{"message":"[DOCS]
Fix create rule open API specification
(#157950)","sha":"e38d08c91adb7305cb872afd5a37504d5b6c0848"}}]}]
BACKPORT-->
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
## Summary
This PR limits the number of categories by which we can filter calls to
the find cases API.
The limit is now 100.
---------
Co-authored-by: lcawl <lcawley@elastic.co>
Fixes#155983
## Summary
This PR changes the accepted params for the Find Comments API to be only
`perPage`, `page` and `sort_order`.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: lcawl <lcawley@elastic.co>
Fixes#155978
## Summary
- Remove the `fields` parameter from the find cases API
- Limit the `searchFields` parameter in the find cases API
One of the FTR tests was actually successfully calling the find_cases
API while passing the fields parameter but only certain combinations of
fields would actually work.
Passing single fields would not work.
I just removed the test as we won't support the `fields` param anymore.
---------
Co-authored-by: lcawl <lcawley@elastic.co>
Resolves https://github.com/elastic/kibana/issues/135035.
In this PR, I'm removing the deprecated attribute
`alerting_framework_heath` from the alerting framework health API.
## To verify
1. Start Kibana.
2. Call `/api/alerting/_health`.
3. Notice `alerting_framework_heath` is no longer part of the HTTP API
response.
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: lcawl <lcawley@elastic.co>
This PR adds a new find API for retrieving a subset of the user actions
for a case.
Issue: https://github.com/elastic/kibana/issues/134344
```
GET /api/cases/<case_id>/user_actions/_find
Query Paramaters
{
types?: Array of "assignees" | "comment" | "connector" | "description" | "pushed" | "tags" | "title" | "status" | "settings" | "severity" | "create_case" | "delete_case" | "action" | "alert" | "user" | "attachment"
sortOrder?: "asc" | "desc"
page?: number as a string
perPage?: number as a string
}
```
<details><summary>Example request and response</summary>
Request
```
curl --location --request GET 'http://localhost:5601/api/cases/8df5fe00-96b1-11ed-9341-471c9630b5ec/user_actions/_find?types=create_case&sortOrder=asc' \
--header 'kbn-xsrf: hello' \
--header 'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==' \
--data-raw ''
```
Response
```
{
"userActions": [
{
"created_at": "2023-01-17T21:54:45.527Z",
"created_by": {
"username": "elastic",
"full_name": null,
"email": null,
"profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0"
},
"owner": "cases",
"action": "create",
"payload": {
"title": "Awesome case",
"tags": [],
"severity": "low",
"description": "super",
"assignees": [],
"connector": {
"name": "none",
"type": ".none",
"fields": null,
"id": "none"
},
"settings": {
"syncAlerts": false
},
"owner": "cases",
"status": "open"
},
"type": "create_case",
"id": "8e121180-96b1-11ed-9341-471c9630b5ec",
"case_id": "8df5fe00-96b1-11ed-9341-471c9630b5ec",
"comment_id": null
}
],
"page": 1,
"perPage": 20,
"total": 1
}
```
</details>
## Notable Changes
- Created the new `_find` route
- Created a new `UserActionFinder` class and moved the find* methods
from the `index.ts` file into there as well as the new find logic
- Extracted the transform logic to its own file since its shared between
multiple files now
- Extracted the user action related integration test functions to the
`user_action.ts` utility file
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: lcawl <lcawley@elastic.co>