API Filter Regex/Wildcard/Search

I would like to send GET-requests to the API which contain wildcards or other ways to search for strings.

As an example, I use this filter to get an object with a specific IP-Address, which works perfectly.

    "name": "ip",
    "value": ""

But now I would also like to be able to list all objects which have an IP-address starting with 192.168.178. I tried multiple things.

  • 192.168.178.*
  • 192.168.178.%
  • 192.168.178./.*/

But none of these work.
Can anyone tell me how I can use wildcards with the Datagerry API? I searched for ways to use regex in MongoDB which did work when testing them in a MongoDB directly. But I don’t know how to format these Regex-queries so that I can send them via Python requests. Or, if that would even work.

I already mentioned it, but I use Python requests to communicate with the API.

Hello @iwdQg3RK and welcome to the community,

have you already seen our documentation.

For this you can use the filter statements of MongoDB (Important: only aggregate statements)

Example :
{ ‘$match’: {‘fields.value’: {’$regex’: ‘Service’, ‘$options’: ‘ims’}}

With kind regards

Hello @sergej.dumler, thanks for welcoming me :slight_smile:

Yes, I have seen the documentation, it’s what I used to get started. However, I couldn’t find a regex-filter example in there or anywhere else.

Thank you very much for the provided example, I will try it out :smiley:

Kind regards.