getCallMetrics

Request Method: GET

Description: Retrieves a metric breakdown of calls

URL: https://api.iovox.com:444/Calls?v=3&method=getCallMetrics

The following parameters can be sent in the querystring

ParameterDescriptionDefault ValueData TypeMandatory
vAPI version to use
INTEGERYES
pageThe page number to return. Use together with limit to achieve paginated results1INTEGERNO
limitDetermines how many results to return. Use together with page to achieve paginated results. Maximum here is 2000020000INTEGERNO
sdtReturns all calls since a given date. Start date format is YYYY-MM-DD HH:MM:SS with hours, minutes and seconds being optional. Hours, minutes and seconds defaults to 00:00:001st day of current month at 00:00:00DATETIMENO
edtReturns all calls before a given date. End date format is YYYY-MM-DD HH:MM:SS with hours, minutes and seconds being optional. Hours, minutes and seconds defaults to 23:59:59Current day at 23:59:59DATETIMENO
node_idReturns all calls for the specified Node ID
STRINGNO
node_typeReturns all calls for the specified Node Type
STRINGNO
link_idReturns all calls for the specified Link ID
STRINGNO
link_typeReturns all calls for the specified Link Type
STRINGNO
call_resReturns all data under the given call result, e.g. ANSWERED
STRINGNO
rule_resReturns all data under the given rule result, e.g. Call to an Operator
STRINGNO
call_originReturns all data under the given call origin, e.g. 447966111222
STRINGNO
call_origin_encryptionReturns all data under the given call origin encrypted, e.g. 4478_516CD74E0509B222
STRINGNO
voxnumberReturns all data under the given VoxNumber, e.g. 448456111222
INTEGERNO
call_destReturns all data under the given call destination, e.g. 447966123456
STRINGNO
ctypeReturns all data under the given call type, e.g. DIRECT or API
STRINGNO
detailReturns all data for the given detail. This includes IP Address (for makeTwoWayCall) and conference room number
STRINGNO
cat_idsReturns all data for the given category IDs. To produce an AND based search separate each by a comma and to produce an OR based, separate as array elements. For example, cat_ids[]=1,2&cat_ids[]=3,4 would search where category ID is (1 AND 2) OR (3 AND 4). Note: if a search is made for Category ID 5, potentially Location = London, results will include any items further down the tree, such as Notting Hill
ARRAYNO
req_fieldsComma separated list of abbreviated metrics to return in response. tc=Total Calls, acpd=Average Calls Per Day, tct=Formatted Total Call Time (00:00:00), tcts=Total Call Time in Seconds, act=Formatted Average all Time (00:00:00), acts=Average Call Time in seconds, ttt=Formatted Total Talk Time (00:00:00), ttts=Total Talk Time in Seconds, att=Formatted Average Talk Time (00:00:00), atts=Average Talk Time in Seconds, tuc=Total Unique Callers, tun=Total Unique Nodes, tul=Total Unique Links tc,ttt,att,tuc,tun,tulSTRINGNO
group_fieldsComma separated abbreviations of up to 2 fields to group the result set by. These will be appended to the req_fields list. cdate = Call Date, cweekd=Call Weekday, cmonth=Month of Call, co=Call Origin, coe=Call Origin Encrypted , vn=VoxNumber, cd=Call Destination, detail=IP Address/Conference ID, call_res=Call Result, nid=Node ID, ntype=Node Type, lid=Link ID, lname=Link Name, ltype=Link Type
STRINGNO
outputSpecifying XML or JSON returns data in XML or JSON format XMLSTRINGNO

Result

Error Result

HTTP CodeError StringResolution
400API Version EmptyAdd a value for the v parameter in the query string
400API Version InvalidCorrect v parameter
400Request Method must be GET. x attemptedSwitch request method x to GET
400Page Number not an integerRemove non-numerics from page
400Limit not an integerRemove non-numerics from limit
400Limit must be between 1 and 20000Correct the limit
400Start Date InvalidCorrect sdt parameter
400End Date InvalidCorrect edt parameter
400Voxnumber not an integerCorrect Voxnumber
400Required Fields Invalid: fieldone,fieldtwoCorrect or remove fieldone and fieldtwo
400Group Fields Invalid: groupone,grouptwoCorrect or remove groupone and grouptwo
400Output Type InvalidCorrect output parameter
500Internal Server ErrorRetry later

Success Result

Example 1: Full list of metrics for each Node, broken down further into Call Result:

https://api.iovox.com:444/Calls?v=2&method=getCallMetrics&req_fields=tc,acpd,tuc,tun,tul&group_fields=nid,call_res

<?xml version="1.0" encoding="utf-8"?>
<response>
     <current_page>1<current_page>
     <total_pages>4<total_pages>
     <total_results>350<total_results>
     <results>
         <result>
             <call_result>ANSWERED</call_result>
             <total_calls>100</total_calls>
             <ave_calls_per_day>12</ave_calls_per_day>
             <total_call_time>08:20:00</total_call_time>
             <total_call_time_sec>30000</total_call_time_sec>
             <ave_call_time>00:05:00</avg_call_time>
             <ave_call_time_sec>300</avg_call_time_sec>
             <total_talk_time>06:40:00</total_talk_time>
             <total_talk_time_sec>24000</total_talk_time_sec>
             <ave_talk_time>00:04:00</avg_talk_time>
             <ave_talk_time_sec>240</avg_talk_time_sec>
             <total_unique_callers>20</total_unique_callers>
             <total_unique_nodes>80</total_unique_nodes>
             <total_unique_links>76</total_unique_links>
         </result>
         <result>
             ...
         <result>
    </results>
 </response>

Example 2: Comparison of calls to each Link Type:

https://api.iovox.com:444/Calls?v=2&method=getCallMetrics&req_fields=tc,acpd&group_fields=ltype

<?xml version="1.0" encoding="utf-8"?>
<response>
     <current_page>1<current_page>
     <total_pages>4<total_pages>
     <total_results>350<total_results>
     <results>
         <result>
             <link_type>Street Sign</link_type>
             <total_calls>20</total_calls>
             <ave_calls_per_day>1</ave_calls_per_day>
         </result>
         <result>
             <link_type>Magazine Advertisement</link_type>
             <total_calls>200</total_calls>
             <ave_calls_per_day>10</ave_calls_per_day>
         </result>
         <result>
             <link_type>Web Advertisement</link_type>
             <total_calls>500</total_calls>
             <ave_calls_per_day>25</ave_calls_per_day>
         </result>
    </results>
 </response>