Query List results using the API

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Query List results using the API

Postby gaudentic » Wed Feb 21, 2024 10:28 am

Hello,

I'm an analyst in a debt collection company, and I have a couple of questions.

Here is a little of context: A partner does a report from Agent Time Detail and Export Calls Reports, he extracts this info manually from the Vicidial UI. I'm trying to automate this report, but i need to query this information using programming lenguage (I'm using Python). I think that I might only need to query the List results to do this aggregated info.

Is it possible to query the List of a campaign with API or SQL?

If so, what do I need to do it? what kind of user account should I ask for to the admin to do it?

I often think that the person in charge of Vicidial in my company does not know all this things, because he can´t query this info with SQL, so I can´t rely in him :roll: (all the info must be somewhere in the server right?). Thats why I'm asking in this forum.
gaudentic
 
Posts: 4
Joined: Wed May 05, 2021 8:55 pm

Re: Query List results using the API

Postby RBecker » Wed Feb 21, 2024 1:13 pm

You cannot query the entire list directly via the API, only single lead records. The API isn't meant for mass data export like this.
Managed & Dedicated ViciDial Hosting | VoIP Trunking and Termination | https://www.dial-fusion.com/
Main Cluster: 21 Agent Servers | Dedicated DB and Separate Reports Server | 2 Web Servers | HAProxy Load Balancing | Dedicated Archive Server
RBecker
 
Posts: 43
Joined: Mon Aug 30, 2021 3:05 pm

Re: Query List results using the API

Postby gaudentic » Wed Feb 21, 2024 1:41 pm

What about via MySQL?
gaudentic
 
Posts: 4
Joined: Wed May 05, 2021 8:55 pm

Re: Query List results using the API

Postby RBecker » Thu Feb 22, 2024 12:45 pm

Yes, if you have MySQL access, look at the 'vicidial_list' table. That should have what you need in it.
Managed & Dedicated ViciDial Hosting | VoIP Trunking and Termination | https://www.dial-fusion.com/
Main Cluster: 21 Agent Servers | Dedicated DB and Separate Reports Server | 2 Web Servers | HAProxy Load Balancing | Dedicated Archive Server
RBecker
 
Posts: 43
Joined: Mon Aug 30, 2021 3:05 pm

Re: Query List results using the API

Postby gaudentic » Fri Feb 23, 2024 2:40 pm

What do I need to have acces to the MySQL DB? I want to ask the manager so I can query the table with python. user, password, database, server name?

And also: can I query the "Agent Time Detail" and "Export Calls Reports" via MySQL?

Thanks!
gaudentic
 
Posts: 4
Joined: Wed May 05, 2021 8:55 pm

Re: Query List results using the API

Postby williamconley » Wed Jan 01, 2025 8:28 pm

gaudentic wrote:What do I need to have acces to the MySQL DB? I want to ask the manager so I can query the table with python. user, password, database, server name?

And also: can I query the "Agent Time Detail" and "Export Calls Reports" via MySQL?

Thanks!


The vicidial_list table has the lead information, accumulated throughout the lifetime of the lead on the system. but the log tables (there are plenty) have the detail records of each individual call and other types of transactions. Search for tables with _log at the end (or _log_archive for older records).

In many cases you can add &DB=1 (or find it in the existing URL and add the "1") to get the sql queries used in each report. Note that there are a lot of security/access queries that will happen before the actual report queries. But if you're completely unsure you can access the code of the file in question and just dump the SQL to screen specifically in case they (somehow) managed to leave out the final actual queries from the DB output. Sometimes there are multiple queries as the data is taken from one table for a base and other tables for details or summaries. But it's all there in PHP. If you know any programming language (such as python), you should be able to decipher it and add an extra "echo" line for the sql query variable.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20342
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Support

Who is online

Users browsing this forum: No registered users and 68 guests