Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Niclas Lindqvist 48 posts 127 karma points
    Jan 14, 2020 @ 16:01
    Niclas Lindqvist
    0

    Does /content/filter api not allow filter on "name" field?

    When using /content/filter endpoint in the Umbraco Heartcore Delivery API, it seems i cannot filter on "predefined" fields such as name (being the node name/title in the API response). Is this intentional and if so, why?

    Also, how can i Filter on nested content, such as selected nodes in a "Multinode Treepicker"?

  • Morten Christensen 596 posts 2773 karma points admin hq c-trib
    Jan 21, 2020 @ 12:46
    Morten Christensen
    100

    The alias for the standard Name field is "nodeName" so try using that as the alias.

    For nested content, I don't think that is possible as its the alias for the property editor that is used and not in a nested fashion. But if you post a few more details about your nested content and multinode setup we can dive into what is possible.

    / Morten

  • Niclas Lindqvist 48 posts 127 karma points
    Jan 21, 2020 @ 14:00
    Niclas Lindqvist
    0

    Thanks for clearifying! Is this documented somewhere? Are there other properties that are renamed in the json-output?

    For the nested example, I might be taking a detour trying to setup my backoffice like this but here goes:

    I have documents like this (where Cars and Offers are two root nodes

    • Cars (type: carsRoot)
      • Volvo (type: make)
        • XC90 (type: model)
    • Offers (type: offersRoot)
      • Customer X (type: customer)
        • Offer 1 (type: offer)

    I then want to find all Offer where the Multinode Treepicker model is XC90

    I try doing this using /content/filter/ with something like:

    {
        "contentTypeAlias": "offer",
        "properties":[
            {
                "alias": "model.Name",
                "value": "XC90",
                "match": "Contains"
            }
        ]
    }
    

    Any assistance on how to make this happen is very appreciated, I can remodel the relation to something more appropriate if required. The only requirement from my side is that the offer cannot be a child node of the model and must remain in hierarchy with its customer.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies