how to Filter users based on a particular field?

Hello! I'm trying to retrieve a user by their user_name property. Below is the URL I'm calling with HTTP GET. I get no results. However, when I remove the filter query parameter, I can see this user along with all other users. What's wrong here? The documentation is really vague about it. Concrete examples with the URL would've been much clearer.

https://nykizq7354.trial.sugarcrm.eu/rest/v10/Users?filter%5B0%5D%5Buser_name%5D%3Dscm-curl2%40blah.com&… 

The URL decoded value of the filter parameter above is 

filter[0][user_name]=scm-curl2@blah.com

Parents Reply
  • Did you follow the example from this article?

    As per this example and your needs, the request may be something like that:

    curl -s -X POST -H OAuth-Token:{access_token} -H Cache-Control:no-cache -d '{      "filter":[         {            "user_name":<user_name>       }    ],    "max_num":2,    "offset":0,    "fields":"id",    "order_by":"date_entered",    "favorites":false,    "my_items":false }' https://{site_url}/rest/v10/Users/filter
    André Lopes
    Lampada Global
    Skype: andre.lampada
Children