It seems like your browser didn't download the required fonts. Please revise your security settings and try again.
Barracuda Phone System

CDR API Examples and FAQ

  • Last updated on

Curl Command Line Examples

The following examples all use the curl command line tool. Results are returned either in JSON or CSV format, depending upon which CDR API is used. In the following examples, the IP address of the BPS is 10.10.1.1. User 222 with PIN of 1122 has report permissions. A user with admin level permissions could also execute these commands.

Unfiltered CDR list, i.e. all CDRs in system

JSON:

curl -H 'application-type:json' 'http://10.10.1.1/gui/cdr/cdr?__auth_user=222&__auth_pass=1122'

CSV:

curl 'http://10.10.1.1/gui/cdr/csv?__auth_user=222&__auth_pass=1122'

CDRs from past 24 hours (run just after midnight to get "yesterday's calls"):

JSON:

curl -H 'application-type:json' 'http://10.10.1.1/gui/cdr/cdr?__auth_user=222&__auth_pass=1122&since=1%20day'

CSV:

curl 'http://10.10.1.1/gui/cdr/csv?__auth_user=222&__auth_pass=1122&since=1%20day'

CDRs for the past hour; useful for periodic polling

JSON:

curl -H 'application-type:json' 'http://10.10.1.1/gui/cdr/cdr?__auth_user=222&__auth_pass=1122&since=60%20minute'

CSV:

curl 'http://10.10.1.1/gui/cdr/csv?__auth_user=222&__auth_pass=1122&since=60%20minute'

Note that the minute value can be adjusted, although it is not recommended to poll more frequently than every 10 minutes.