Page 1 of 1
API calls
Posted:
Fri Mar 08, 2019 3:34 am
by 0x1337
Hi there i am using the latest version of vicibox and although i can get a lot of info via the api i would like to know if i can get the today calls for a agent that has done and the status of the dispositions of them.
Thank you in advance
Re: API calls
Posted:
Fri Mar 08, 2019 6:23 am
by mflorell
The only Non-Agent API function I can think of that is close to this is "agent_stats_export", which doesn't have per-dispo counts. If you need those you'll have to gather them from one of the standard reports, or a direct database query of the vicidial_agent_log table.
Re: API calls
Posted:
Tue Mar 12, 2019 8:29 am
by 0x1337
Thank you for the reply.
So i need to query the report page and handle the response?
Re: API calls
Posted:
Tue Mar 12, 2019 9:20 am
by mflorell
There are DOWNLOAD link options for most of the reports, like on the User Stats report, that show individual calls and the agent dispo. You can easily grab those with a simple web call using only a URL.
Re: API calls
Posted:
Wed Mar 13, 2019 3:31 am
by 0x1337
http://xxx.xxx.xxx.xxx/vicidial/AST_tea ... 9:59&group[]=1000&group[]=10000&group[]=11000&group[]=12000&group[]=13000&group[]=14000&group[]=2000&group[]=3000&group[]=4000&group[]=5000&group[]=6000&group[]=7000&group[]=9000&user_group[]=ADMIN&user_group[]=Agents&user_group[]=QCOK&user_group[]=VAdmin&call_status[]=A&call_status[]=AA&call_status[]=AB&call_status[]=ADC&call_status[]=ADCT&call_status[]=AFAX&call_status[]=AFTHRS&call_status[]=AL&call_status[]=AM&call_status[]=B&call_status[]=CALLBK&call_status[]=CBHOLD&call_status[]=DC&call_status[]=DEC&call_status[]=DNC&call_status[]=DNCC&call_status[]=DNCL&call_status[]=DROP&call_status[]=ERI&call_status[]=INCALL&call_status[]=IVRXFR&call_status[]=LRERR&call_status[]=LSMERG&call_status[]=MAXCAL&call_status[]=MLINAT&call_status[]=N&call_status[]=NA&call_status[]=NANQUE&call_status[]=NEW&call_status[]=NI&call_status[]=nieerr&call_status[]=NP&call_status[]=PDROP&call_status[]=PM&call_status[]=PU&call_status[]=QCFAIL&call_status[]=QUEUE&call_status[]=QVMAIL&call_status[]=RQXFER&call_status[]=SVYCLM&call_status[]=SVYEXT&call_status[]=SVYHU&call_status[]=SVYREC&call_status[]=SVYVM&call_status[]=TIMEOT&call_status[]=XDROP&call_status[]=XFER&call_status[]=Zualt&file_download=1&search_archived_data=&SUBMIT=SUBMIT
how should i add the user that i want to be logged on this request? running it like that returns = Login incorrect, please try again: |||BAD|
Re: API calls
Posted:
Wed Mar 13, 2019 4:59 am
by mflorell
If you are using an application like 'wget' you will need to use an authorized user's credentials to be able to run the report. Something like this will work:
- Code: Select all
`/usr/bin/wget --auth-no-challenge --http-user=$http_user --http-password=$http_pass --output-document=/tmp/X$HTMLfile --output-file=/tmp/Y$HTMLfileLOG $REPORT_URL`;
Re: API calls
Posted:
Wed Mar 13, 2019 5:47 am
by 0x1337
what if wanna call it from an another server?
i mean i using golang to gather up the stats from my servers so i need to call that from other ips!
Re: API calls
Posted:
Wed Mar 13, 2019 6:40 am
by mflorell
The above wget line would work from any server in the world, providing your VICIdial system is accessible to the internet.
Re: API calls
Posted:
Wed Mar 13, 2019 7:26 am
by 0x1337
thank you very much
Re: API calls
Posted:
Wed Apr 03, 2019 3:27 am
by 0x1337
Hi again is there anyway to get json back from that?via the api?
Re: API calls
Posted:
Wed Apr 03, 2019 5:16 am
by mflorell
VICIdial APIs do not use JSON in any way.
Re: API calls
Posted:
Wed Apr 03, 2019 6:57 am
by 0x1337
parsing the html file is a real pain, is there a way to get something else returned there?
thank you in advance
Re: API calls
Posted:
Wed Apr 03, 2019 9:01 am
by mflorell
By default, the APIs return data as pipe-delimited, not HTML. As for reports, most of them have a DOWNLOAD option that returns CSV or Tab-delimited data.
What exactly are you looking for?
Re: API calls
Posted:
Wed Apr 03, 2019 9:24 am
by 0x1337
wget serverIP --auth-no-challenge --http-user=Username --http-password=Password --output-document=log1.csv --output-file=log1.csv
http://ServerIP/vicidial/AST_agent_status_detail.php\?DB\=\&query_date\=2019-02-01\&end_date\=2019-02-05\&group[]=1000&group[]=10000&group[]=11000&group[]=12000&group[]=13000&group[]=14000&group[]=16000&group[]=17000&group[]=18000&group[]=2000&group[]=3000&group[]=4000&group[]=5000&group[]=6000&group[]=7000&group[]=9000&user_group[]=ADMIN&user_group[]=Agents&user_group[]=QCOK&user_group[]=VAdmin&shift=ALL&search_archived_data=&show_defunct_users=&report_display_type=TEXT&DB=&stage=&file_download=1
i am trying like this but the data looks a bit wierd
i wanna get agent status view in csv
Re: API calls
Posted:
Wed Apr 03, 2019 6:20 pm
by mflorell
Try the DOWNLOAD link option, just add "&file_download=1" to the end of your URL
Re: API calls
Posted:
Thu Apr 04, 2019 4:25 am
by 0x1337
yeah i got it thank you so much for the help