diff --git a/x-pack/plugins/asset_manager/server/routes/assets/hosts.ts b/x-pack/plugins/asset_manager/server/routes/assets/hosts.ts index 2b1088990334c..68ed4baaeb5c8 100644 --- a/x-pack/plugins/asset_manager/server/routes/assets/hosts.ts +++ b/x-pack/plugins/asset_manager/server/routes/assets/hosts.ts @@ -47,12 +47,15 @@ export function hostsRoutes({ async (context, req, res) => { const { from = 'now-24h', to = 'now' } = req.query || {}; const esClient = await getEsClientFromContext(context); + const coreContext = await context.core; + const soClient = coreContext.savedObjects.client; try { const response = await assetAccessor.getHosts({ from: datemath.parse(from)!.toISOString(), to: datemath.parse(to)!.toISOString(), esClient, + soClient, }); return res.ok({ body: response });