Here are the request params (url = http://sugarcrm.localhost/service/v4_1/rest.php):
method=get_entry_list&input_type=json&response_type=json
&rest_data {"session":"2q67jvlce802e4htsqc94oshkat9henvicvfclprhrbd8ef6k0o0",
"module_name":"Contacts",
"query":"email1=ychaouche@feeder.fr",
"order_by":"",
"offset":0,
"select_fields":[],
"link_name_to_fields_array":[],
"max_results":0,
"deleted":false}
I get this as a result :
"{"name":"Access Denied","number":40,"description":"You do not have access"}"
Edit
This error is fired whenever the subquery is malformed, not necessarily when one doesn't have access to a module, so one should be aware of it.
Well, one solution to my problem is to replace that query with this one :
Since appearantly the email1 and email2 fields are not queriable (they're not in the Contacts table). The workaround consists of querying the email_address table via a subquery.
EDIT : so that the whole query should look something like this :