Skip to content

Commit

Permalink
[8.x] [Observability] Migrate from the legacy Find alert API to the n…
Browse files Browse the repository at this point in the history
…ew one (#199877) (#200143)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Observability] Migrate from the legacy Find alert API to the new one
(#199877)](#199877)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT [{"author":{"name":"Bena
Kansara","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-14T10:39:21Z","message":"[Observability]
Migrate from the legacy Find alert API to the new one
(#199877)\n\nResolves
https://github.com/elastic/kibana/issues/192873","sha":"560ae9ab3095e55a0949e5853cd510e47b77dab8","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-management"],"title":"[Observability]
Migrate from the legacy Find alert API to the new
one","number":199877,"url":"https://github.com/elastic/kibana/pull/199877","mergeCommit":{"message":"[Observability]
Migrate from the legacy Find alert API to the new one
(#199877)\n\nResolves
https://github.com/elastic/kibana/issues/192873","sha":"560ae9ab3095e55a0949e5853cd510e47b77dab8"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199877","number":199877,"mergeCommit":{"message":"[Observability]
Migrate from the legacy Find alert API to the new one
(#199877)\n\nResolves
https://github.com/elastic/kibana/issues/192873","sha":"560ae9ab3095e55a0949e5853cd510e47b77dab8"}}]}]
BACKPORT-->

Co-authored-by: Bena Kansara <[email protected]>
  • Loading branch information
kibanamachine and benakansara authored Nov 14, 2024
1 parent 36df94f commit 4c15ff4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const allowedConsumers = ['apm', 'uptime', 'logs', 'infrastructure', 'alerts'];
export async function getObservabilityAlerts({ http }: { http: HttpSetup }) {
try {
const { data = [] }: { data: Rule[] } =
(await http.get('/api/alerts/_find', {
(await http.get('/api/alerting/rules/_find', {
query: {
page: 1,
per_page: 20,
Expand Down

0 comments on commit 4c15ff4

Please sign in to comment.