Filter users when calling REST API

Added by Lil Champ 4 months ago

Hello everyone,,
I am trying to find a specific user by email like this:
curl -x '' -u TOKEN 'http://SERVER_IP/users.json?mail='
But i get all users.
I can see this kind https://capread.com of filtering works for issues.json.

Can someone confirm it is not really possible to filter users when using the REST API?

Replies (1)

RE: Filter users when calling REST API - Added by Mayama Takeshi 4 months ago

According to the docs, you should use:

  curl -x '' -u TOKEN 'http://SERVER_IP/users.json?name=user1@test1.com'

name: filter users on their login, firstname, lastname and mail ; if the pattern contains a space, it will also return users whose firstname match the first word or lastname match the second word.

https://www.redmine.org/projects/redmine/wiki/Rest_Users

(1-1/1)