|
461 | 461 | import org.opensearch.rest.action.ingest.RestGetPipelineAction;
|
462 | 462 | import org.opensearch.rest.action.ingest.RestPutPipelineAction;
|
463 | 463 | import org.opensearch.rest.action.ingest.RestSimulatePipelineAction;
|
| 464 | +import org.opensearch.rest.action.list.AbstractListAction; |
| 465 | +import org.opensearch.rest.action.list.RestIndicesListAction; |
| 466 | +import org.opensearch.rest.action.list.RestListAction; |
464 | 467 | import org.opensearch.rest.action.search.RestClearScrollAction;
|
465 | 468 | import org.opensearch.rest.action.search.RestCountAction;
|
466 | 469 | import org.opensearch.rest.action.search.RestCreatePitAction;
|
@@ -802,9 +805,14 @@ private ActionFilters setupActionFilters(List<ActionPlugin> actionPlugins) {
|
802 | 805 |
|
803 | 806 | public void initRestHandlers(Supplier<DiscoveryNodes> nodesInCluster) {
|
804 | 807 | List<AbstractCatAction> catActions = new ArrayList<>();
|
| 808 | + List<AbstractListAction> listActions = new ArrayList<>(); |
805 | 809 | Consumer<RestHandler> registerHandler = handler -> {
|
806 | 810 | if (handler instanceof AbstractCatAction) {
|
807 |
| - catActions.add((AbstractCatAction) handler); |
| 811 | + if (handler instanceof AbstractListAction && ((AbstractListAction) handler).isActionPaginated()) { |
| 812 | + listActions.add((AbstractListAction) handler); |
| 813 | + } else { |
| 814 | + catActions.add((AbstractCatAction) handler); |
| 815 | + } |
808 | 816 | }
|
809 | 817 | restController.registerHandler(handler);
|
810 | 818 | };
|
@@ -980,6 +988,9 @@ public void initRestHandlers(Supplier<DiscoveryNodes> nodesInCluster) {
|
980 | 988 | }
|
981 | 989 | registerHandler.accept(new RestTemplatesAction());
|
982 | 990 |
|
| 991 | + // LIST API |
| 992 | + registerHandler.accept(new RestIndicesListAction()); |
| 993 | + |
983 | 994 | // Point in time API
|
984 | 995 | registerHandler.accept(new RestCreatePitAction());
|
985 | 996 | registerHandler.accept(new RestDeletePitAction());
|
@@ -1011,6 +1022,7 @@ public void initRestHandlers(Supplier<DiscoveryNodes> nodesInCluster) {
|
1011 | 1022 | }
|
1012 | 1023 | }
|
1013 | 1024 | registerHandler.accept(new RestCatAction(catActions));
|
| 1025 | + registerHandler.accept(new RestListAction(listActions)); |
1014 | 1026 | registerHandler.accept(new RestDecommissionAction());
|
1015 | 1027 | registerHandler.accept(new RestGetDecommissionStateAction());
|
1016 | 1028 | registerHandler.accept(new RestRemoteStoreStatsAction());
|
|
0 commit comments