MOR API aggregate get
From Kolmisoft Wiki
Revision as of 07:13, 22 January 2024 by Edvardas (talk | contribs) (Created page with "=Description= <!---This functionality is available from MOR X18---> MOR API update existing Device from params. Allowed users: Admin Reseller Pro Accountant with Data->Stats permission <br><br> =Usage= * '''MOR''' call: '''/api/aggregate_get''' * Methods: POST, GET(if allowed, not recomended) <br><br> ===Parameters=== * u - username to login. '''Required'''. * hash – SHA1 hash constructed using '''API Secret Key''' (MOR API...")
Description
MOR API update existing Device from params.
Allowed users:
Admin
Reseller Pro
Accountant with Data->Stats permission
Usage
- MOR call: /api/aggregate_get
- Methods: POST, GET(if allowed, not recomended)
Parameters
- u - username to login. Required.
- hash – SHA1 hash constructed using API Secret Key ( More described in Constructing hash). Required.
- from - Date from which queues log start. If not used, this parameter will be set to today's date 00:00:00. Date should be entered in Unix time stamp (Epoch) format.
- till - Date when queues log end. If not used, this parameter will be set to today's date 23:59:59. Date should be entered in Unix time stamp (Epoch) format.
- a_currency – currency code, by default usd.
- group_by_user – group by user possible values [0,1]. (Default: 0).
- group_by_device – group by device possible values [0,1]. (Default: 0).
- group_by_terminator – group by terminator possible values [0,1]. (Default: 0).
- group_by_provider – group by termination point possible values [0,1]. (Default: 0).
- group_by_dst_group – group by destination group possible values [0,1]. (Default: 0).
- group_by_dst – group by destination possible values [0,1]. (Default: 0).
- group_by_day – group by day possible values [0,1]. (Default: 0).
- group_by_hour – group by hour possible values [0,1]. (Default: 0).
- group_by_user_rate – group by user rate possible values [0,1]. (Default: 0).
- group_by_provider_rate – group by provider rate possible values [0,1]. (Default: 0).
* NOTE by default grouped by originator, terminator and destination group
- s_originator_id – id of user.
- s_terminator_id – id of terminator.
- s_device – id of device.
- s_provider – id of provider.
- a_src – value for CallerID.
- a_dst – value for Destination.
- s_duration - value for Duration.
- dst_group – value for Destination Group.
- use_real_billsec – Possible values [0,1]. (Default: 0).
- from_user_perspective - Possible values [0,1]. (Default: 0).
- answered_calls - show aggregates when Answered Calls >= value.
- profit_show - Possible values [0,1]. (Default: 0).
- clid - CallerID number or name
Request
If API Secret Key = secret
You send:
HTML POST: http://<SERVER IP>/billing/api/aggregate_get?u=admin&hash=e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4
* Note that username (u) is not included in the hash