From 608f48dbacc75c6842b84eac804650de03190c1b Mon Sep 17 00:00:00 2001 From: Dima Arnautov Date: Tue, 18 Feb 2020 17:48:24 +0100 Subject: [PATCH] [ML] fix apidoc methods, passing es_search endpoint payload --- x-pack/legacy/plugins/ml/server/routes/system.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/legacy/plugins/ml/server/routes/system.ts b/x-pack/legacy/plugins/ml/server/routes/system.ts index 0ab9c1c6e1ddf8..0bed15b91f2e31 100644 --- a/x-pack/legacy/plugins/ml/server/routes/system.ts +++ b/x-pack/legacy/plugins/ml/server/routes/system.ts @@ -104,7 +104,7 @@ export function systemRoutes({ /** * @apiGroup SystemRoutes * - * @api {post} /api/ml/ml_capabilities Check ML capabilities + * @api {get} /api/ml/ml_capabilities Check ML capabilities * @apiName MlCapabilities * @apiDescription Checks ML capabilities */ @@ -144,7 +144,7 @@ export function systemRoutes({ /** * @apiGroup SystemRoutes * - * @api {post} /api/ml/ml_node_count Get the amount of ML nodes + * @api {get} /api/ml/ml_node_count Get the amount of ML nodes * @apiName MlNodeCount * @apiDescription Returns the amount of ML nodes. */ @@ -195,7 +195,7 @@ export function systemRoutes({ /** * @apiGroup SystemRoutes * - * @api {post} /api/ml/info Get ML info + * @api {get} /api/ml/info Get ML info * @apiName MlInfo * @apiDescription Returns defaults and limits used by machine learning. */ @@ -233,7 +233,7 @@ export function systemRoutes({ licensePreRoutingFactory(xpackMainPlugin, async (context, request, response) => { try { return response.ok({ - body: await context.ml!.mlClient.callAsCurrentUser('search'), + body: await context.ml!.mlClient.callAsCurrentUser('search', request.body), }); } catch (error) { return response.customError(wrapError(error));