Use Hyper DB by Rest API

Hyper uses a non-SQL database.
It has a DB connection component to do all the tasks (Tables, Files, Messenger, and Authorization).
This page explains how to access the Tables and the Files (objects) by HTTP protocol and JSON format.


The application structure is a classic middle tier. You can connect multiple WebApps (Http Servers) to a single Database (single server).

  • You need to build a tree of requests (one or more) in a standard json format.
    The basis of the json is an array of objects []. The name of each object is the command to the server (for example "query" or "load").
    All requests will be executed in the order they were originally issued and in a single run.
    You pass the array of requests in a single Http Post to the Domain/ExecuteDB address.
    [
      {"Query":{"Table","Select","Where"}},
      {"Load":{"Table","Key"}}
    ]
    
  • The Database server checks your request tree (whether the syntax is correct), and then checks the Feasibility of your requests.
    The first error found is the one that will be returned and the test will stop.
    That is, if you have 3 errors that you are not aware of, you will be required to try and fail 3 times and only on the 4th attempt will you be able to run the transaction.
  • The Hyper database is built around the idea of ​​"all or nothing" (Fill or Kill).
    If your requests include an update of the database, Remember: it is all or nothing.

    In the case of a communication failure in receiving the response, it is possible that the database has been updated
    (meaning the entire transaction was executed on the server side), and you do NOT know about it !!!
    See separate architecture page for handling communication errors.
  • The server will response between 0.5 seconds and up-to 30 minutes (for a big transaction), 90 seconds is a good default.
    Monitor and adjust your timeouts according to the task and your expirience with the system.
    Finally, the response that will be returned to you will also be in the form of an array of objects,
    with the same number and names as the requests and in the same order.
  • Authorization: Every WebApp has it's own User name and Auth Groups.
    Meaning just like a human user inside Hyper Client app, the administrator can limit the fields you can access.

Query Table - "Select" and "Where"

Endpoint name Domain/Query or as part of request array
{"Query":{}}

{
  "Table":"hyp_Clients",
  "Storage":"NA",

  "Select":[
    "Client Number",
    "Client Full Name",
    "Email",
    "1st Phone",
    "Gender"
  ],

  "Where":[
    {
      "FldName":"Agency",
      "Equal":0,
      "Context":"OR"
    },
    {
      "FldName":"Agency",
      "Equal":2,
      "Context":"OR"
    },
    {
      "FldName":"Created On",
      "Above":"2024-01-01 09:00",
      "Context":"AND"
    }
  ]
}

  • Main object name (command name) is
    "Query"
    .
  • Mandatory string value
    "Table"
    must contain a table name from hyper's schema.
  • Mandatory string value
    "Storage"
    must contain 1-3 of these letters:
    N - Current data ("normal" storage).
    A - Archived data.
    D - Deleted data.
    The order of the letters determines the order in which data will be restored. "NA" meaning query the Current storage 1st and the Archive 2nd.
    Most common is to query only the Current ("normal") storage
    "Storage":"N"
    .

  • Possible array of strings
    "Select"
    may be added, otherwise all table fields will be returned (according to the WebApp authorization).
    The string items in this array should be "Schema field name", but you can also use the "Json field name" as 2nd best.

  • Possible array of Objects
    "Where"
    may be added, otherwise whole records will be returned.
    Each where statement object is build from 3 elements, by this order:
    1. "FldName"
      string value: just like in "Select", hyper will first search by "Schema field name" and if not found, then it will search by "Json field name".
    2. Fixed Logical condition as element name and then a String, Number, Bool, or Object value.
      Condition Description
      "Equal" Confirm records in which this field Equals to the passed value.
      "Above" Confirm records in which this field Equals OR Above to the passed value.
      "Below" Confirm records in which this field Equals OR Below to the passed value.
      "ContainString" Confirm records in which this field contain the passed value (string), using the simplest and basic algorithm.
      "StringSearch" Confirm records in which this field contain the passed value (string), using a search engine (by words/elements).
      "InRange" Confirm records in which this numeric/date/time field is inside the passed range.
      The value must be an object with both
      "Min"
      and
      "Max"
      .
      "ContainGroupItems" Confirm records in which this text/group field contains at least one item from the passed list.
      The list should be passed in an array of strings, separated by comma.
      "Compare_To_Field" Confirm records by comparing this numeric/date/time field to another numeric/date/time field in the same record.

      Use string conditions only on text fields:
      "Equal", "ContainString", "StringSearch", "ContainGroupItems"
      .
      Use numeric/date/time conditions only on non-text fields:
      "Equal", "Above", "Below", "InRange", "Compare_To_Field"
      .
    3. "Context"
      string value with one of the following:
      "OR", "AND", "OR NOT", "AND NOT"
      .
      The default value is "AND", in case you omit this element.
      In the query execution, the "Context" comes before the "Logical condition" like a virtual brackets.

      The example above, look like this:
      ("Agency" = 0) OR ("Agency" = 2) AND ("Created On" >= 2024-01-01 09:00)

Additional Where Conditions

Use
"InRange"
for one field between two values.
Both edges are inclusive. You must send both
"Min"
and
"Max"
.
For date/time fields, optional
"DateTimeLogic"
values are:
"AS IS", "Whole Days Anyway", "Only On Integer"
.

"Where":[
  {
    "FldName":"Created On",
    "InRange":{
      "Min":"2026-01-01",
      "Max":"2026-01-31",
      "DateTimeLogic":"Only On Integer"
    }
  }
]

Use
"ContainGroupItems"
for text/group fields that may contain several selected items.
"Where":[
  {
    "FldName":"Authorized Groups",
    "ContainGroupItems":["Admin,Managers"]
  }
]

Use
"Compare_To_Field"
to compare two numeric/date/time fields in the same record.
Accepted
"Equation"
values:
"=", "<>", "<", ">", "<=", ">="
.
Text values are also accepted:
"Equal To", "Different Than", "Less Than", "More Than", "Less Than Equal To", "More Than Equal To"
.
"Where":[
  {
    "FldName":"Actual Price",
    "Compare_To_Field":"Cost Price",
    "Equation":"<"
  }
]

Replacement for brackets

In SQL, you can group multiple logical conditions in parentheses and write a logical gate between them.
Our query language is a bit limited; you can group logical conditions at only one level, creating only 2 logical levels.
Final result can look like this:
(A and B) OR (C OR D AND E) AND (F)
.
In the coming months (not later the Oct 2025), we will publish a new structure on this topic and create 3D logics using the JSON structure.

Simply add this object to the where array
{"Close_Group_And_Start_a_New_Group":""}
value can be one of the following:
"OR", "AND", "OR NOT", "AND NOT"
.

Here is an example:
"Where":[
  {
    "FldName":"Agency",
    "Equal":0,
  },
  {
    "FldName":"Created On",
    "Above":"2025-01-01",
  }

  {"Close_Group_And_Start_a_New_Group":"OR"}

  {
    "FldName":"Agency",
    "Equal":2,
  },
  {
    "FldName":"Created On",
    "Above":"2024-01-01 09:00",
  }
]