Rest API: Find users with no (null) organizations

Infos:

  • Used Zammad version: 5.2.3
  • Used Zammad installation type: ubuntu package
  • Operating system: Ubuntu 21.04
  • Browser + version: MS Edge 104.0.1293.54, Chrome Enterprise 104.0.5112.102

Expected behavior:

  • If i try to search all users with no organizations (organization_id) i get allways no result.

Actual behavior:

I try to get all users with no organizations. This looks like

https://zammad-server.tld/api/v1/users?query=organization_ids:NIL or https://zammad-server.tld/api/v1/users?query=organization_ids:NULL

I get allways an empty array. Is it possible to fetch users with no organization_id’s

Steps to reproduce the behavior:

  • Fetch the users endpoint with query params (see above)
  • check the result

I’m afraid you can’t search for missing organizations due to Elasticsearch limitations.
You can’t lookup null values. According to the payload it’s a null value if unset.

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