|
464 | 464 | import org.opensearch.rest.action.ingest.RestGetPipelineAction;
|
465 | 465 | import org.opensearch.rest.action.ingest.RestPutPipelineAction;
|
466 | 466 | import org.opensearch.rest.action.ingest.RestSimulatePipelineAction;
|
| 467 | +import org.opensearch.rest.action.list.AbstractListAction; |
| 468 | +import org.opensearch.rest.action.list.RestIndicesListAction; |
| 469 | +import org.opensearch.rest.action.list.RestListAction; |
467 | 470 | import org.opensearch.rest.action.search.RestClearScrollAction;
|
468 | 471 | import org.opensearch.rest.action.search.RestCountAction;
|
469 | 472 | import org.opensearch.rest.action.search.RestCreatePitAction;
|
@@ -806,9 +809,14 @@ private ActionFilters setupActionFilters(List<ActionPlugin> actionPlugins) {
|
806 | 809 |
|
807 | 810 | public void initRestHandlers(Supplier<DiscoveryNodes> nodesInCluster) {
|
808 | 811 | List<AbstractCatAction> catActions = new ArrayList<>();
|
| 812 | + List<AbstractListAction> listActions = new ArrayList<>(); |
809 | 813 | Consumer<RestHandler> registerHandler = handler -> {
|
810 | 814 | if (handler instanceof AbstractCatAction) {
|
811 |
| - catActions.add((AbstractCatAction) handler); |
| 815 | + if (handler instanceof AbstractListAction && ((AbstractListAction) handler).isActionPaginated()) { |
| 816 | + listActions.add((AbstractListAction) handler); |
| 817 | + } else { |
| 818 | + catActions.add((AbstractCatAction) handler); |
| 819 | + } |
812 | 820 | }
|
813 | 821 | restController.registerHandler(handler);
|
814 | 822 | };
|
@@ -985,6 +993,9 @@ public void initRestHandlers(Supplier<DiscoveryNodes> nodesInCluster) {
|
985 | 993 | }
|
986 | 994 | registerHandler.accept(new RestTemplatesAction());
|
987 | 995 |
|
| 996 | + // LIST API |
| 997 | + registerHandler.accept(new RestIndicesListAction()); |
| 998 | + |
988 | 999 | // Point in time API
|
989 | 1000 | registerHandler.accept(new RestCreatePitAction());
|
990 | 1001 | registerHandler.accept(new RestDeletePitAction());
|
@@ -1016,6 +1027,7 @@ public void initRestHandlers(Supplier<DiscoveryNodes> nodesInCluster) {
|
1016 | 1027 | }
|
1017 | 1028 | }
|
1018 | 1029 | registerHandler.accept(new RestCatAction(catActions));
|
| 1030 | + registerHandler.accept(new RestListAction(listActions)); |
1019 | 1031 | registerHandler.accept(new RestDecommissionAction());
|
1020 | 1032 | registerHandler.accept(new RestGetDecommissionStateAction());
|
1021 | 1033 | registerHandler.accept(new RestRemoteStoreStatsAction());
|
|
0 commit comments