Using the REST API I want to get Target Lists that have more than 2 Targets In List. I noticed that in the database structure the prospect_lists table, which corresponds to Target Lists, does not have an entry_count field, which would make the query easier.
I tried the following API call rest data, but itâs giving the âAccess Deniedâ error.
POST /suitecrm/service/v4_1/rest.php?input_type=json&response_type=json&method=get_entry_list&rest_data={âsessionâ:âsession_idâ,âmodule_nameâ:âProspectListsâ,âqueryâ:"(prospect_lists.id+in+(SELECT+prospect_lists.id+FROM+prospect_lists+join+users+on+prospect_lists.assigned_user_id=users.id+group+by+users.id+having+count(*)>=1))",âorder_byâ:"",âoffsetâ:0,âselect_fieldsâ:[],âlink_name_to_fields_arrayâ:[],âmax_resultsâ:100,âdeletedâ:0,âfavoritesâ:false}
In phpmyadmin, as an SQL query the query is returning the correct result, but it is necessary for me to use the REST API.
How can I obtain the âTargets in Listâ count? Is there a way to run âcomplexâ queries like the one iâve written in the rest data?
Any help would be greatly appreciated.