Change data request

A typical request to change the data in DWKIT contains folowing parameters:

  • viewName - the name of the view
  • data formatted as JSON to Update, Insert or Delete

Type of change is determined by HTTP verb.

Next chaining occurs on the web server and causes the changing of the data:

  1. Verification that the current user has the right to add/edit/delete data from the specified view determined by viewName . If not - then the request processing is interrupted, and the error message returns.
  2. Calling of the before update/insert/delete function which has been bonded with view. In this function is possible to change the data which has been passed from the client or implement other business logic.
  3. Insert/Update/Delete data from database via DWKIT ORM.
  4. Creating a version of the modified object if necessary.
  5. Calling of the after update/insert/delete function which has been bonded with view. In this function is possible to implement some business logic.
  6. The information about operation (success, ids of created objects) is formatted to JSON and returned to client.

Change data request