Request for menu

  1. The request to get menu items is made using the getTableDataPredicate method (the “method” field).

As parameters (the “params” field), the following is specified:

    [{
        "entityName": "a",
        "schemaName": "b",
        "predicate": null,
        "limit": null,
        "offset": 0,
        "order":
            [{
                "field":"path",
                "desc":false
            }],
        "where": ""
    }]

Instead of “a” and “b”, enter:

  • instead of “a” - you must specify the name of the entity in the database;
  • instead of “b” - specify the name of the scheme.

If the request was successful, the server will send the following data in response:

  • error - error code with the value “null”;
  • jsonrpc - protocol version with the value “2.0”;
  • result - the data returned by the method:
    • data - directly a list of menu items and sub-items, each of which contains:
      • iconclass - the name of the icon, if there is one;
      • key - key (if available);
      • name - the full name of the menu item in the database;
      • parent - the parent menu item, if available;
      • path - the path to the menu item (including all parent elements);
      • projection - the short name of the element in the database;
      • title - the title of the menu item, as it is displayed to the user;
      • view_id - the format for displaying the data indicated by the menu item;
    • offset - offset of records, when requesting rows not from the first row;
    • records - displays the number of records, namely all menu items, including sub-items;
    • sql - SQL query to the database;
  • username - the username of the user, if authorization was performed.