Rest Api filtering documentation
Hi forum,
I'm missing the filter docs? I see examples of how to filter and I get a sense of what is possible. But where is it described? Or am i just not that bright :-D
Im having trouble finding what I need in https://docs.ninox.com/en/api/public-cloud-apis.
Im looking for best ways to query data, query related data. If there's a difference between using filter in GET vs POST then let me know how to use POST
What I need to be able to do in a order orderline scenario
- get all orders where field ready is yes and order date is after today
- get all orderlines related to an order . On the order there is a field orderlines: [1,3,21,34]
- special: get all orderlines related to order where the multi value field (from a dropdown) contains a specific value. Ex the dropdown field is itemType and one line contains [50,51,53] and we want to select all orderlines with 51
- Is it possible to query function (calculated) fields?
- query vs filter - i found a community post that stats that query is slower and gives a score. Is this documented anywhere?
best
jesper
3 replies
-
You could make a global function in Ninox where you query the data you need, for example >
global function:
function getorders(variable : text) do (select Orders where field = variabele).{ eml: email, Firstn: Firstname, Lastn : Lastname} end
if you test this function in the Ninox console, you should get a json format back with 3 fields (eml,Firstn and Lastn): getorders("Jesper")
Then you can call this global function with the GET request
https://api.ninox.com/v1/teams/AbcdeFgggghhh/databases/gghhXXXXXjkjh/query?query=getorders("Jesper"),{ method: 'GET', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer Abcde-fgh444-FHGGGF-GGGHJGHJ' }}
Hope this helps.
-
Your suggesten is the best way for now as rest filter is not documented. I was told at last webinar that this is on Ninox agenda which I look forward to.
Thanks again
Content aside
-
1
Likes
- 1 yr agoLast active
- 3Replies
- 229Views
-
2
Following