Hi, i try to figure out how Mautic API call to contacts is working.
When i go to the webgui contacts it tells me that i have 1788 contacts in there.
When i do the call i get “total”: “10247” in the JSON result, why?
Also there is much to much information comming back, nearly 330 lines for one single contact (even if i set “minimal” to “true” in the call params).
Is there a way to let only fields of interest being returned by the call?
Hi, could you try to post your API call script/code? That might help debug.
I am not that familiar, however it could be brining back anonymous contacts as well.
to check the exact number you can query the leads table in the mauticDB
That sounds reasonable. So there must be a filter i can send as parameter to only get my “real” contacts. Any idea?
It is very easy to test, just use something like “Postman” or ANY API tool of your choice and access: <MAUTIC-URL>/api/contacts
without any additional parameters. In my setup i use old Basic Auth (API URL is internal accessable only, this must be enabled in the config).
Then look at the results and compare with what your WebGUI is telling you.
When i use is:anonymous
as filter inside Mautic GUI i get 8470 results. When i use no filter i got 1787 contacts. Together 10257 (voilá, that’s the sum i don’t understand in first post).
Now, the question is: What is the right filter to use to only get contacts that also showed up in GUI?
I tested “email:*” but that did not work.