non_agent_api.php / agent_stats_export

All installation and configuration problems and questions

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

non_agent_api.php / agent_stats_export

Postby richard_tyne » Tue Jun 21, 2016 6:53 am

VERSION: 2.12-79

Hi,

A company I am working for is using a hosted vicidial which seems to be acting a little odd. The agent_status_export function of non_agent_api returns its data as a single line, with a space where I would have thought a new line should be.

calling...

/vicidial/non_agent_api.php?function=agent_stats_export&source=test&datetime_start=2016-06-21+00:00:00&datetime_end=2016-06-21+23:59:59&user=username&pass=password&header=NO&stage=csv

returns this...

UserA,Aaa Aaaaaaaa,FlexiAgents,31,1:56:02,0:34:41,0:00:00,0:00:54,1.2%,1334,1,1:56:02,32,0:00:42,19.2%,32,0:27:49 UserB,Bbb Bbbbbbbbbbbb,PermAgents,116,1:57:26,0:24:02,0:00:00,0:00:24,4.6%,2526,1,1:57:26,123,0:00:21,35.9%,123,0:46:29 UserC,Ccc Cccccccc,OtherAgents,108,1:34:50,0:34:06,0:00:00,0:00:27,4.3%,272,1,1:34:50,113,0:00:02,4.8%,113,0:49:09 ...

Is this normal behavior? I also noticed that for some reason if you set header=YES, the header will be output but it misses the '|total_wait_time' from the end.

Regards & Thanks!
richard_tyne
 
Posts: 4
Joined: Tue Jun 21, 2016 6:00 am

Re: non_agent_api.php / agent_stats_export

Postby mflorell » Tue Jun 21, 2016 8:27 am

Is that browser view or source view?

The API should be returning records separated by a newline, in browser view that will show as a space, but in source view you will see each one is on a separate line.
mflorell
Site Admin
 
Posts: 18386
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: non_agent_api.php / agent_stats_export

Postby richard_tyne » Wed Jun 22, 2016 6:43 am

Thanks mflorel, I was being silly.
richard_tyne
 
Posts: 4
Joined: Tue Jun 21, 2016 6:00 am


Return to Support

Who is online

Users browsing this forum: No registered users and 141 guests