Adding pass through shema creation
[aai/search-data-service.git] / src / main / java / org / onap / aai / sa / rest / SearchServiceApi.java
index dc091dd..249f6b1 100644 (file)
@@ -86,6 +86,18 @@ public class SearchServiceApi {
     return indexApi.processCreateIndex(requestBody, request, headers, index, documentStore);
   }
 
+  @PUT
+  @Path("/indexes/dynamic/{index}")
+  @Consumes({MediaType.APPLICATION_JSON})
+  public Response processCreateDynamicIndex(String requestBody,
+                                     @Context HttpServletRequest request,
+                                     @Context HttpHeaders headers,
+                                     @PathParam("index") String index) {
+
+    // Forward the request to our index API to create the index.
+    IndexApi indexApi = new IndexApi(this);
+    return indexApi.processCreateDynamicIndex(requestBody, request, headers, index, documentStore);
+  }
 
   @DELETE
   @Path("/indexes/{index}")