Built-in service “crud”

The crud service implements the REST API according to the model of basic CRUD operations (create, read, update, delete).

Available at <server address>/rest/crud.

The service requires registration in deploy.json of the application and requires specifying the data source data Repo in options of the service, as well as the auth authorization source for accessing user data. It is advisable to specify a repository with full security processing as the data repository in order to work out access to objects that take dynamic security into account. For example

{
  "modules": {
    "rest": {
      "globals": {
        "di": {
          "crud": {
            "module": "modules/rest/lib/impl/crud",
            "options": {
              "auth": "ion://auth",
              "dataRepo": "ion://securedDataRepo"
            }
          }

Authentication is performed through all the main access types.

Example

curl -X POST -u demo@local:ion-demo https://dnt.iondv.com/rest/crud

Example of a request to the crud service without parameters in dnt: test/modules/rest/crud.spec.js

/Checking crud service/# check if the response for null parameters is valid

By default, without the correct parameters - the server responds with the 404 error code

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /rest/crud</pre>
</body>
</html>

Information on interacting with crud through the main methods: