Skip to content

Add REST API as a feature #2786

@samialfattani

Description

@samialfattani

I think it is ver cool that a user can expose the ModelView to be used by REST API requests including all CRUD operations. We can add extra attributes such as api_can_read, api_can_create, api_can_edit, api_can_delete to the ModelView. However We should think about some details as follows:

  • Data should be submitted in JSON format then it is internally converted into Form and submitted to the current endpoints such as /edit, /action, /new ...etc.
  • Response should be retrived in JSON including flash messages and errors.
  • Data Validation should be responsible by same WTF validators that used currently.
  • Enable our users to override thier own functionlity to check the requeust's Authentication and Authorization.
  • All events such as on_model_change, after_model_change...etc should be also working with REST API in the same manner.

Happy to hear feedback from you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions