This method allow you to obtain CallCenter Report
Method parameters
Parameter Name | Description | Allowed Values | Default Value | Optional |
---|---|---|---|---|
from_date | Start of report date range | "YYYY-MM-DD" | none | no |
to_date | End of report date range | "YYYY-MM-DD" | none | no |
mode | Which data to fetch | "summary", "date", "hour", "month", "day_of_week", "caller_name", "in_charge", "raw_channels", "raw_processed", "raw_detailed_cdr", "date_hour" | no |
Examples using curl
Example 1:
$ curl -u 'DOMAIN_NAME:API_TOKEN' https://bcs.brastel.com/basix/api/get_callcenter_report -X POST -H 'Content-Type: application/json' -d '{"from_date": "2019-01-01", "to_date": "2019-01-31", "mode": "summary", "output": "json"}'
{"result_code":0, "data": {JSON_DATA}}
Example 2: getting data in CSV format.
For this, instead of POST use a GET request with parameters in the querystring. You must also include extra parameter output=csv:
$ curl -u 'DOMAIN_NAME:API_TOKEN' 'https://bcs.brastel.com/basix/api/get_callcenter_report?from_date=2019-01-01&to_date=2019-01-31&mode=summary&output=csv'
SOME_CSV_DATA