From 074d29a810f33f65011db1b9e66d5fdaf257e259 Mon Sep 17 00:00:00 2001 From: Darshit Chanpura Date: Thu, 2 Jan 2025 12:59:06 -0500 Subject: [PATCH] Adds an example share request as javadoc comment Signed-off-by: Darshit Chanpura --- .../timeseries/rest/RestShareConfigAction.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/opensearch/timeseries/rest/RestShareConfigAction.java b/src/main/java/org/opensearch/timeseries/rest/RestShareConfigAction.java index 7d2580000..3072aaa88 100644 --- a/src/main/java/org/opensearch/timeseries/rest/RestShareConfigAction.java +++ b/src/main/java/org/opensearch/timeseries/rest/RestShareConfigAction.java @@ -24,7 +24,21 @@ /** * Registers REST API to handle detector/forecaster sharing. * Here is an example request: - * + * POST /_plugins/_anomaly_detection/detectors + * { + * "config_id" : , + * "share_with" : { + * "AD_FULL_ACCESS": { + * "users": ["x"], + * "roles": ["y"], + * "backend_roles": ["z"] + * } + * } + * } + * example response: + * { + * "message": "Resource shared successfully with " + * } */ public class RestShareConfigAction extends BaseRestHandler { public RestShareConfigAction() {}