Page 1 of 1

non_agent_api.php / agent_stats_export

PostPosted: Tue Jun 21, 2016 6:53 am
by richard_tyne
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!

Re: non_agent_api.php / agent_stats_export

PostPosted: Tue Jun 21, 2016 8:27 am
by mflorell
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.

Re: non_agent_api.php / agent_stats_export

PostPosted: Wed Jun 22, 2016 6:43 am
by richard_tyne
Thanks mflorel, I was being silly.