Zammad user search with group in query

Hi,

I want to know if I can perform search queries on the user API like this:
/api/v1/users/search?query=login:ala*

but to filter by group not by login (or both)

I tried the following:
/api/v1/users/search?query=group:admin
/api/v1/users/search?query=group_id:1
/api/v1/users/search?query=group_ids:1

is it possible or the only way is to use this?
/api/v1/groups/1

for me the latter does not do the job…

Many thanks in advance, have a great day!

I think you’re mixing things up.
Groups are where your tickets life in.
They technically do not have anything to do with your users / agents except for them having access permission to see / update tickets in that group.

Can you please describe what your goal is? There might be a solution to your problem.

Thanks for your response. My goal is to display a list of users belonging to a group, in order to assign them to a ticket.

i’m not sure if you mean roles or groups,
if you mean roles you can search like this;
/api/v1/users/search?query=role_ids:2

if you mean groups, you can check;
/api/v1/groups
and iterate over the user_ids field. to find the users belonging to that group

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