You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/04/10 00:00:38 UTC

[GitHub] [incubator-superset] dpgaspar opened a new issue #7259: [SIP-17] Proposal for using new FAB REST API

dpgaspar opened a new issue #7259: [SIP-17] Proposal for using new FAB REST API
URL: https://github.com/apache/incubator-superset/issues/7259
 
 
   Motivation
   ========
   Take advantage of the new FAB REST API feature available since version 1.13.X. The previous
   API endpoints available inside ``ModelView`` did not follow a strict RESTful convention, and will be removed in 1.15.X. The following are some improvements:
   
   - API resource protection using JWT and/or flask-login signed cookies (current authentication method). API defaults to JWT only.
   - Optional CRUD RESTful API using similar class overrides as ``ModelViews``
   - Delegate base API support like handling exceptions to FAB.
   - Leverage Rison style URI arguments out of the box with optional JSON schema validation
   - OpenAPI automatic spec generation for CRUD, and easy generation for BaseApi method endpoints
   
   Proposed Change
   ==============
   I propose migrating current views.Api class to BaseApi. So Superset will have it's new API properly anchored on ``/api/v1/<resource>/`` and start using FAB's new feature.
   
   - The endpoint ``/api/v1/query`` does not need to change it's route or HTTP method.
   
   - The endpoint ``/api/v1/form_data/`` would be changed to /api/v1/slice/<id> using ``ModelRestApi`` on readonly mode (can_get, can_info only permissions).
   
   New or Changed Public Interfaces
   ==========================
   This SIP affects the following API endpoints:
   
   - **/api/v1/form_data** GET -> **/api/v1/slice** GET: exposing a get item and get list leveraging complex filters, pagination, internationalization, ordering, custom select columns (all the way to the database)
   
   Optional Swagger UI for OpenAPI spec visualization.
   
   New dependencies
   ===============
   New dependencies were added to FAB 1.13.0:
   
   - marshmallow
   - marshmallow_enum
   - marshmallow-sqlalchemy
   - Flask-JWT-Extended
   - prison
   - apispec[yaml]
   
   Migration Plan and Compatibility
   =========================
   A side by side migration plan can be achieved. Since the new API endpoint is exposed on a different route. Access to the old endpoint would log a deprecation log message.
   
   Rejected Alternatives
   ================
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org