You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

REQUEST

This API is used to get the Call Details Report. In Portal, It is the query data action then display on the web. This API allows many arguments and filter criteria. It will be described in next part.

The structure of API as below:

GET

localhost:8888

Required Arguments

Required Argument is the parameter that you have to put into API to run it. The API can't be run without Required Argument. The list of Required Argument of this API is described as below:

ParameterDescription
start_timeSearch within the specified time. It allows negative values ( start time is greater than end time ). This parameter is the start time of the specified time. The format of Start Time is YYYY-MM-DD HH:MM:SS

Optional Arguments

Optional Argument is the parameter that you can put into API to run it. The API can be run without Requirement Argument. The list of Optional Argument of this API is described as below:

On this page:

ParameterDescription
end_timeThis parameter is the end time of the specified time to search CDR. The format of End Time is YYYY-MM-DD HH:MM:SS. If you fill out the end time, the API will query data from start time to end time. If you don't fill in the end time, the API will query data from start time to the current time.
from, count

Printing range. Default: print everything.

From: Select the page that you want to print. If from=3, it will print from page 3 to the end.

Count: Select the total records display per page. If there are 53 records and we set Count = 10, it will print to 6 pages: 5 pages have 10 records and 1 page have 3 records.

format

Select the format of output file. There are three types of format:

csv: CSV file ( default ).

json: Output is json file.

cdr_json: CDR lines, wrapped into json list.

fieldSelect the list of fields to print. Comma-separated list of fields to print. Default: print all fields
human_readableUsing human-readable values
print_only_amountSelect amount records to print. If you found 100 records, but you set 50 for print_only_amount, it prints 50 records only.

Search filter

This is the parameter to filter data. The list of filter criteria is described as below:

ParameterDescription
release_causeFilter by release cause. We input the ID of release cause into API and the format of this parameter is the integer. To know about the ID, please refer Global Route Error.
orig_codeFilter by the Origination code (integer). It is Country Name, Code Name and Code of the place where make the call. Please refer Rate Table for further information.
term_codeFilter by the Termination code (integer). It is Country Name, Code Name and Code of the place where receiving the call. Please refer Rate Table for further information.
ingress_idFilter by ID of Ingress Trunk (integer). Login to V6 → Go to Routing → Trunks → Get the ID of trunk.
egress_idFilter by ID of Egress Trunk (integer). Login to V6 → Go to Routing → Trunks → Get the ID of trunk.
orig_dest_host Filter by originating destination hostname (string).
source_numberFilter by Originating source number (string).
dest_numberFilter by Originating destination numbers (string).
term_source_numberFilter by Termination source number (string).
term_dest_numberFilter by Termination destination number (string).
orig_call_idFilter by Origination call ID (string)
term_call_idFilter by Termination call ID (string)
routing_digitsFilter by Routing Number (string)
ingress_rcauseFilter by Release Cause on Ingress Trunk (string). Please refer Default Fail Over Rule for further information.
egress_rcauseFilter by Release Cause on Egress Trunk (string). Please refer Default Fail Over Rule for further information.
is_final_callSet 1 to show final call only. Set 2 to show not final call only and default is show all.
non_zeroSet 1 to show non zero call only . Set 2 to show zero call only and default is show all. Zero call is the call with the duration time is 0.

duration_min

duration_max

Filter by the duration time of call (integer). You have to set the Duration Min and Duration Max. The call has duration time belong to this period will be shown.

cost_min

cost_max

Filter by the cost of call (floating point). You have to set the Cost Min and Cost Max. The call has cost in range will be shown.
call_tzFilter by call timezone in minutes (integer).
only_authorizedSet 1 to show authorized call only. Set 2 to show unauthorized call only and default is show all.


  • No labels