The GO API can be queried by passing a json-structure in the query-parameter of the URL such as https://server/endpoint/?query=JSON_STRUCTURE

The JSON structure can consist of query commands and logic commands.

Query commands

Query commands should contain three fields: type, fieldname and value

TypeMeaning
GreaterReturn everything where fieldname is greater than value.
GreaterEqualReturn everything where fieldname is greater or equal than value.
LesserReturn everything where fieldname is lesser than value.
LesserEqualReturn everything where fieldname is lesser or equal than value.
LikeReturn everything where value is contained in fieldname.
MatchReturn everything where fieldname equals value.
OneOfReturn everything where fieldname is one of value (value should be an array).

Logical commands

Logical commands contains a type and one or more conditions which are further query or logical commands.

TypeAdditional fieldsMeaning
ANDcondition1, condition2Return everything which satisfies both condition1 and condition2.
ORcondition1, condition2Return everything which satisfies either condition1 or condition2.
NOTconditionReturn everything which doesn't satisfy condition.

Examples

Find all data where age is equal or greater than 18

{"type":"GreaterEqual","fieldname":"age","value":18}
CODE


Find all data where age is less than 40 and gender is male


{"type":"AND","condition1":{"type":"Lesser","fieldname":"age","value":40},"condition2":{"type":"Match","fieldname":"gender","value":"male"}}
CODE


Find all data where firstname contains the letter a


{"type":"Like","fieldname":"firstname","value":"a"}
CODE


Find all data changed since a specific time stamp


{"type":"Greater","fieldname":"change_date","value":"2021-01-15 14:45:00"}
CODE