Эх сурвалжийг харах

[api] adding importer_submit api to public operation

ayush.goyal 4 жил өмнө
parent
commit
ee81afa5e0

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

@@ -201,6 +201,10 @@ def guess_field_types(request):
   django_request = get_django_request(request)
   return indexer_api3.guess_field_types(django_request)
 
+@api_view(["POST"])
+def importer_submit(request):
+  django_request = get_django_request(request)
+  return indexer_api3.importer_submit(django_request)
 
 # Connector API
 

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

@@ -104,6 +104,7 @@ urlpatterns += [
 urlpatterns += [
   re_path(r'^indexer/guess_format/?$', api_public.guess_format, name='indexer_guess_format'),
   re_path(r'^indexer/guess_field_types/?$', api_public.guess_field_types, name='indexer_guess_field_types'),
+  re_path(r'^indexer/importer/submit', api_public.importer_submit, name='indexer_importer_submit'),
 ]
 
 urlpatterns += [

+ 1 - 1
docs/docs-site/content/developer/api/rest/_index.md

@@ -458,7 +458,7 @@ Then getting some data sample as well as the column types (column names will be
       .....
     }
 
-Then we submit via `https://demo.gethue.com/indexer/api/importer/submit` and provide the `source` and `destination` parameters. We get back an `operation id` (i.e. some SQL Editor query history id).
+Then we submit via `https://demo.gethue.com/api/indexer/importer/submit` and provide the `source` and `destination` parameters. We get back an `operation id` (i.e. some SQL Editor query history id).
 
 If the `show_command` parameter is given, the API call will instead return the generated SQL queries that will import the data.