Rest query empty values

Infos:

  • Used Zammad version: 3.6
  • Used Zammad installation source: package
  • Operating system: CentOS
  • Browser + version: Chrome 87

Expected behavior:

  • I have a rest query searching für users with an empty address like this
    https://xxxx/api/v1/users/search?limit=500&query=address:null (tried address:none or address:’’)
    which should return all users who have no address.
    I guess I have used a wrong query, but it seems I cannot find a way to search for empty values. Which is what I am looking for or is this not possible?

Actual behavior:

  • The requests returns nothing

Steps to reproduce the behavior:

  • query using the request above

You have to use the .keyword addition in this case.
I’ve verified the below - adapting to the users endpoint should work as well:

/api/v1/search?query=phone.keyword:""

Another side note: Zammad is a ruby application. In most cases null will be nil in the Zammad world.

2 Likes

Awesome! Thanks a lot, I really appreciate your help with this!

1 Like

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.