Products
<PbxDomApi> – JavaScript client for <pbx-dom-api>
This SDK is automatically generated by the Swagger Codegen project:
To publish the library as a npm,
please follow the procedure in “Publishing npm packages”.
Then install it via:
npm install <pbx-dom-api> --save
If the library is hosted at a git repository, e.g.
https://github.com/YOUR_USERNAME/
then install it via:
npm install YOUR_USERNAME/<pbx-dom-api> --save
The library also works in the browser environment via npm and browserify. After following
the above steps with Node.js and installing browserify with
npm install -g browserify
perform the following (assuming main.js is your entry file):
browserify main.js > bundle.js
Then include bundle.js in the HTML pages.
Please follow the installation instruction and execute the following JS code:
var <PbxDomApi> = require('<pbx-dom-api>');
var api = new <PbxDomApi>.DefaultApi()
var rptType = 1.2; // {Number} Report type. (0 report, 1 widget, 2 chart).
var rptId = 1.2; // {Number} Report id.
var opts = {
'start': 3.4, // {Number} Start offset.
'limit': 3.4, // {Number} Number of results to return. Max 10K.
'sortBy': "sortBy_example", // {String} Sort column.
'sortType': "sortType_example", // {String} Sort mode asc/desc.
'fromDate': "fromDate_example", // {String} Start date time.
'toDate': "toDate_example", // {String} End date time.
'duration': 3.4, // {Number} Duration range.
'phone': "phone_example", // {String} List of caller phone.
'phone1': "phone1_example", // {String} List of dialled phones.
'co': "co_example", // {String} List of trunk/co.
'ext': "ext_example", // {String} list of extensions.
'pbxId': 3.4, // {Number} list of PBX Ids.
'callSource': 3.4, // {Number} list of callsource.
'callType': 3.4, // {Number} list of call type signatures.(5 Unanswered Calls, 7 Transfered Calls, 8 Forwarded Calls)
'direction': 3.4, // {Number} list of direction.(0 incoming, 1 outgoing, 2 internal)
'callerName': "callerName_example", // {String} list of caller name.
'did': "did_example", // {String} list of did.
'dnis': "dnis_example", // {String} list of dnis.
'acc': "acc_example", // {String} list of account code.
'ring': 3.4, // {Number} Ring range.Seconds unit.
'cost': 3.4, // {Number} Cost range.
'group': 3.4 // {Number} Department/Group id.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.callsGet(rptType, rptId, opts, callback);
All URIs are relative to https://api.pbxdom.com
Class | Method | HTTP request | Description |
---|---|---|---|
callsGet | GET /Calls | ||
featuresChartsGet | GET /Features/charts | ||
featuresReportsGet | GET /Features/reports | ||
featuresWidgetGet | GET /Features/widget |