Browse Source

[api] Add Top Search APIs to public

Harshg999 4 years ago
parent
commit
9023a17e0f

+ 7 - 0
desktop/core/src/desktop/api_public.py

@@ -192,6 +192,7 @@ def storage_upload_file(request):
   django_request = get_django_request(request)
   django_request = get_django_request(request)
   return filebrowser_views.upload_file(django_request)
   return filebrowser_views.upload_file(django_request)
 
 
+
 # Importer
 # Importer
 
 
 @api_view(["POST"])
 @api_view(["POST"])
@@ -209,6 +210,7 @@ def importer_submit(request):
   django_request = get_django_request(request)
   django_request = get_django_request(request)
   return indexer_api3.importer_submit(django_request)
   return indexer_api3.importer_submit(django_request)
 
 
+
 # Connector
 # Connector
 
 
 @api_view(["GET"])
 @api_view(["GET"])
@@ -305,6 +307,11 @@ def top_aggs(request):
   django_request = get_django_request(request)
   django_request = get_django_request(request)
   return optimizer_api.top_aggs(django_request)
   return optimizer_api.top_aggs(django_request)
 
 
+@api_view(["POST"])
+def search_entities_interactive(request):
+  django_request = get_django_request(request)
+  return desktop_api.search_entities_interactive(django_request)
+
 
 
 # Utils
 # Utils
 
 

+ 4 - 0
desktop/core/src/desktop/api_public_urls.py

@@ -141,3 +141,7 @@ urlpatterns += [
   re_path(r'^optimizer/query_compatibility/?$', api_public.query_compatibility, name='optimizer_query_compatibility'),
   re_path(r'^optimizer/query_compatibility/?$', api_public.query_compatibility, name='optimizer_query_compatibility'),
   re_path(r'^optimizer/similar_queries/?$', api_public.similar_queries, name='optimizer_similar_queries'),
   re_path(r'^optimizer/similar_queries/?$', api_public.similar_queries, name='optimizer_similar_queries'),
 ]
 ]
+
+urlpatterns += [
+  re_path(r'^metadata/search/entities_interactive/?$', api_public.search_entities_interactive, name='metadata_entities_interactive'),
+]