⚠️ APIv2 is legacy
APIv2 is considered legacy and is no longer recommended for new integrations.
We strongly encourage you to use APIv4 for all new integrations and to migrate existing integrations where possible.
Please refer to our latest APIv4 documentation for up-to-date information and integration guidelines:
Click here to view the APIv4 example documentation - your own documentation is at https://[your-instance].langlion.com/api/v4/docs
Basic filtering based on entities' fields is possible with JSON filter passed in query string as a 'filter' parameter.
https://test.langlion.com/api/v2/schoolClasses?filter={"where":{"name":{"like": "%English%"}}}
Building complex filters (including joining conditions and filtering the same fields with different operators - in SQL manner) is possible with comparision and logical operators using filter in JSON format passed in query string as 'filter' parameter (see Basic JSON filtering above).
Joining a few conditions is possible with logical operators passed as a key of object contining conditions.
and - all conditions in condintions' array should be met
or - one of conditions in conditions' array should be met
Field based filtering is possible with comparision operators passed as a key of object containing value.
eq - equals (default)
gt - greater than
gte - greater than or equals
lt - less than
lte - less than or equals
like - pattern matching (wildcard sign: %)
notLike - reverse of like
{
"where":{
"and":[
{
"newLesson.startDate":{
"lt":"2023-03-02 13:30:00"
},
"schoolClass.id": 19
}
]
}
}
https://test.langlion.com/api/v2/students?filter={"where":{"and":[{"user.type":1}]}}&recordFrom=1&recordTo=20`