1

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

null
    • Ninox partner
    • RoSoft_Steven.1
    • 1 yr ago
    • Reported - view

      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.

      • UMAKERS
      • Jesper_Ordrup
      • 1 yr ago
      • Reported - view

       

      Thats a good suggestion and I'll prob use that if nothing else is possible. I would much prefer if we can use the existing endpoints and filter options because of several reasons:

      1) Requesting multiple records using filters seems to be possible out of the box so Im thinking if filtering is described somewhere then we are all set.
      2) It doesnt requrie anyone to code in ninox. I'd much rather send an api description to a javascript developer for the integration.

      Best
      Jesper

    • UMAKERS
    • Jesper_Ordrup
    • 1 yr ago
    • Reported - view

    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
  • 242Views
  • 2 Following