Download a Call Report
Download a specific call report.
Steps to download a call report
Request URL
GET {base_url}/{api_path}/call_report/download?access_token={access_token}
Request parameters
Parameter | Available | Required | Type | Description |
---|---|---|---|---|
type | This parameter is available in all call report types. | Yes | String | Call report type. Valid value:
|
start_time | This parameter is available when querying the following types
of reports.
|
No | String | Specify the start time to filter the reports. Note: The time format depends on the
date and time display format of PBX (set in on PBX).
Examples:
|
end_time | This parameter is available when querying the following types
of reports.
|
No | String | Specify the end time to filter the reports. Note: The time format depends on the
date and time display format of PBX (set in on PBX).
Examples:
|
time | This parameter is available when querying the following types
of reports:
|
Yes | String |
Specify the time frame to filter the call report. Note: The time format depends on the date
display format of PBX.
For example, Date
Display Format of PBX is
Year/Month/Day, then the
valid time format is
Time format:
|
ext_id_list | This parameter is available when querying the following types
of reports:
|
This parameter is required when querying the following types
of reports:
|
String | The ID(s) of the desired extension(s)/extension
group(s). Note:
|
trunk_id | This parameter is available when querying DID/Outbound Caller ID Activity report. | Yes | String | The ID of the desired trunk. Note: You
can query the trunk's ID using Get Menu Options. |
trunk_id_list | This parameter is available when querying the following types
of reports:
|
Yes | String | The ID(s) of the desired trunk(s). Note:
|
ivr_id_list | This parameter is available when querying IVR Report. | Yes | String | The ID(s) of the desired IVR(s). Note:
|
ring_group_id_list | This parameter is available when querying Ring Group Statistics report. | Yes | String | The ID(s) of the desired ring group(s). Note:
|
queue_id | This parameter is available when querying the following types
of reports:
|
Yes | String | The ID of the desired queue. Note: You
can query the queue's ID using Get Menu Options. |
queue_id_list | This parameter is available when querying the following types
of reports:
|
Yes | String | The ID(s) of the desired queue(s). Note:
|
agent_id_list | This parameter is available when querying the following types
of reports:
|
No | String | The ID(s) of the desired agent(s). Note:
|
abandon_time | This parameter is available when querying the following types
of reports:
|
No | String | Set a time. Calls abandoned within the specified time will not be included in report. (Unit: Second) |
talk_time | This parameter is available when querying Queue Performance report. | No | Integer | Set a time. Calls that proceeded within the specified time will be not be included in report. (Unit: Second) |
include_internal | This parameter is available when querying PBX Call Activity report. | No | Integer | Whether to include internal calls in the report. Valid
value:
|
callback_result | This parameter is available when querying Queue Callback Activity report. | No | String | Queue callback result. Valid value:
|
reason | This parameter is available when querying Agent Pause Activity report. | No | String | The reason why an agent switched status to pause. Valid value: The pause reasons set on PBX web portal (Path: ). |
communication_type | This parameter is available when querying the following types
of reports:
|
No | String | Communication type. Note: If this
parameter is omitted, the system will query all the
communication types. Valid value for extension
related reports:
Valid value for trunk related reports:
|
need_detail | This parameter is available when querying the following types of
reports:
|
No | Integer | Whether to include details about the associated calls. Valid
value:
|
is_async | This parameter is available in all call report types. | No | Integer |
Whether to retrieve data and obtain the download URL of call report asynchronously. Valid value:
|
Response parameters
Parameter | Type | Description |
---|---|---|
errcode | Integer | Returned error code.
Note:
|
errmsg | String | Returned message.
|
file | String | The call report file. |
download_resource_url | String | The call report download URL. Note: The
download URL is only valid for 30 minutes. |
Examples
Request example
Obtain the download URL of the queue satisfaction survey report (queue ID: "1") during 04/01/2022 00:00:00-05/31/2022 23:59:59.
start_time
and
end_time
MUST follow the date and time
display format of your PBX, otherwise the response will not return
any records.GET /openapi/v1.0/call_report/download?type=queuesatisfaction&start_time=04/01/2022 00:00:00&end_time=05/31/2022 23:59:59&queue_id=1&access_token=MB1OklPar5hnDfhi4srZa8FrZ4znFSzr HTTP/1.1
Host: 192.168.5.150:8088
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"file": "QueueSatisfaction-X.7.0.7-download-20220608094753-ejP6Z6htIfhsCQbP.csv",
"download_resource_url": "/api/download/QueueSatisfaction-x.7.0.7-download-20220608094753-ejP6Z6htIfhsCQbP.csv"
}
Download the call report
After you get the download URL of the call report, you need to combine it with the {base_url} to compose a download request, and then send the request to download the call report.
Download link format
GET {base_url}/{download_resource_url}
?access_token={access_token}
Download link example
GET https://192.168.5.150:8088/api/download/QueueSatisfaction-x.7.0.7-download-20220608094753-ejP6Z6htIfhsCQbP.csv?access_token=MB1OklPar5hnDfhi4srZa8FrZ4znFSzr HTTP/1.1