mistercrunch commented on a change in pull request #6220: [SIP-5] Open a new
/api/v1/query endpoint that takes query_obj
URL:
https://github.com/apache/incubator-superset/pull/6220#discussion_r230999153
##########
File path: superset/views/api.py
##########
@@ -0,0 +1,32 @@
+# pylint: disable=R
+import json
+
+from flask import g, request
+from flask_appbuilder import expose
+from flask_appbuilder.security.decorators import has_access_api
+
+from superset import appbuilder, security_manager
+from superset.common.query_context import QueryContext
+from superset.models.core import Log
+from .base import api, BaseSupersetView, data_payload_response,
handle_superset_exception
+
+
+class Api(BaseSupersetView):
+ @Log.log_this
+ @api
+ @handle_superset_exception
+ @has_access_api
+ @expose('/v1/query/', methods=['POST'])
+ def query(self):
+ """
+ Takes a query_obj constructed in the client and returns payload data
response
+ for the given query_obj.
+ """
+ query_context =
QueryContext(**json.loads(request.form.get('query_context')))
+ print(query_context)
Review comment:
oops
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]