From 560ae9ab3095e55a0949e5853cd510e47b77dab8 Mon Sep 17 00:00:00 2001 From: Bena Kansara <69037875+benakansara@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:39:21 +0100 Subject: [PATCH] [Observability] Migrate from the legacy Find alert API to the new one (#199877) Resolves https://github.com/elastic/kibana/issues/192873 --- .../public/context/has_data_context/get_observability_alerts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/observability/public/context/has_data_context/get_observability_alerts.ts b/x-pack/plugins/observability_solution/observability/public/context/has_data_context/get_observability_alerts.ts index 57cc6cec10c8..6fb1fa66731b 100644 --- a/x-pack/plugins/observability_solution/observability/public/context/has_data_context/get_observability_alerts.ts +++ b/x-pack/plugins/observability_solution/observability/public/context/has_data_context/get_observability_alerts.ts @@ -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,