51
51
import static org .opensearch .rest .RestRequest .Method .GET ;
52
52
import static org .opensearch .rest .RestRequest .Method .POST ;
53
53
import static org .opensearch .security .dlic .rest .support .Utils .LEGACY_PLUGIN_ROUTE_PREFIX ;
54
- import static org .opensearch .security .dlic .rest .support .Utils .OPENDISTRO_API_DEPRECATION_MESSAGE ;
55
54
import static org .opensearch .security .dlic .rest .support .Utils .PLUGIN_ROUTE_PREFIX ;
56
55
import static org .opensearch .security .dlic .rest .support .Utils .addDeprecatedRoutesPrefix ;
57
56
import static org .opensearch .security .dlic .rest .support .Utils .addRoutesPrefix ;
58
57
59
58
public class DashboardsInfoAction extends BaseRestHandler {
60
59
60
+ private static final String KIBANAINFO_ROUTE_DEPRECATION_MESSAGE =
61
+ "[_opendistro/_security/kibanainfo] is a deprecated endpoint path. Please use _plugins/_security/dashboardsinfo instead." ;;
62
+
61
63
private static final List <Route > routes = ImmutableList .<Route >builder ()
62
64
.addAll (
63
65
addRoutesPrefix (ImmutableList .of (new Route (GET , "/dashboardsinfo" ), new Route (POST , "/dashboardsinfo" )), PLUGIN_ROUTE_PREFIX )
@@ -68,8 +70,8 @@ public class DashboardsInfoAction extends BaseRestHandler {
68
70
.addAll (
69
71
addDeprecatedRoutesPrefix (
70
72
ImmutableList .of (
71
- new DeprecatedRoute (GET , "/kibanainfo" , OPENDISTRO_API_DEPRECATION_MESSAGE ),
72
- new DeprecatedRoute (POST , "/kibanainfo" , OPENDISTRO_API_DEPRECATION_MESSAGE )
73
+ new DeprecatedRoute (GET , "/kibanainfo" , KIBANAINFO_ROUTE_DEPRECATION_MESSAGE ),
74
+ new DeprecatedRoute (POST , "/kibanainfo" , KIBANAINFO_ROUTE_DEPRECATION_MESSAGE )
73
75
),
74
76
LEGACY_PLUGIN_ROUTE_PREFIX
75
77
)
0 commit comments