Difference between revisions of "MOR API user calls get"
From Kolmisoft Wiki
Jump to navigationJump to search
m (→from MOR 11) |
|||
Line 24: | Line 24: | ||
** calltype - Call type. Possible values [all, answered, busy, no_answer, failed, missed, missed_inc, missed_inc_all, missed_not_processed_inc]. (Default: all) | ** calltype - Call type. Possible values [all, answered, busy, no_answer, failed, missed, missed_inc, missed_inc_all, missed_not_processed_inc]. (Default: all) | ||
** device - Device ID in MOR database. Possible values [all, numeric value of device_id]. (Default: all) | ** device - Device ID in MOR database. Possible values [all, numeric value of device_id]. (Default: all) | ||
** [[MOR API hash construction | hash]] - SHA1 hash constructed using params and API_Secret_Key ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''. | ** [[MOR API hash construction | hash]] - SHA1 hash constructed using '''params''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''. | ||
** u - Users username. '''Required'''. | ** u - Users username. '''Required'''. | ||
** p - Users password. '''Required'''. | ** p - Users password. '''Required'''. | ||
Line 49: | Line 49: | ||
** order_by - Possible values [time,src,dst,prefix,nice_billsec,hgc,server,p_name,p_rate,p_price, reseller, r_rate,r_price,user,u_rate,u_price,number, d_provider, d_inc, d_oener]. (Default: time) | ** order_by - Possible values [time,src,dst,prefix,nice_billsec,hgc,server,p_name,p_rate,p_price, reseller, r_rate,r_price,user,u_rate,u_price,number, d_provider, d_inc, d_oener]. (Default: time) | ||
** order_desc - Possible values [0,1]. (Default: 0) | ** order_desc - Possible values [0,1]. (Default: 0) | ||
** [[MOR API hash construction | hash]] - SHA1 hash constructed using params and API_Secret_Key ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''. | ** [[MOR API hash construction | hash]] - SHA1 hash constructed using '''params''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''. | ||
** u - Users username. '''Required'''. | ** u - Users username. '''Required'''. | ||
** p - Users password. '''Required'''. | ** p - Users password. '''Required'''. | ||
Line 68: | Line 68: | ||
* Params: | * Params: | ||
** only_did - get only calls made via DIDs. Possible values [0,1]. (Default: 0) | ** only_did - get only calls made via DIDs. Possible values [0,1]. (Default: 0) | ||
<br><br> | |||
---- | |||
*Example: | |||
**We have s_user = 123, API Secret Key = 456789 | |||
**/api/user_calls?u=admin&p=admin&s_user=123&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441 | |||
'''* Note that username and password are not included in hash''' |
Revision as of 14:02, 22 December 2011
MOR API
This functionality is available from MOR 8
Retrieves list of calls in selected time period for some user/device
Admin - can get every user calls
Reseller - can get his and his users calls
User - can get his own calls
MOR 8
- Call: /api/user_calls
- Methods: POST, GET(if allowed, not recomended)
- Params:
- user_id - Users ID in MOR database. Required.
- period_start - Unix timestamp of calls period starting date. (Default: Today at 00:00).
- period_end - Unix timestamp of calls period end date. (Default: Today at 23:59).
- direction - Call direction. Possible values [outgoing, incoming]. (Default: outgoing)
- calltype - Call type. Possible values [all, answered, busy, no_answer, failed, missed, missed_inc, missed_inc_all, missed_not_processed_inc]. (Default: all)
- device - Device ID in MOR database. Possible values [all, numeric value of device_id]. (Default: all)
- hash - SHA1 hash constructed using params and API_Secret_Key ( More described in Constructing hash). Required.
- u - Users username. Required.
- p - Users password. Required.
- Returns:
- Errors:
- <error>User was not found</error> - User was not found using user_id. Use correct user_id. Make sure that username (u) and password (p) are specified.
- <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
- Errors:
from MOR 9
- Call: /api/user_calls
- Methods: POST, GET(if allowed, not recomended)
- Params:
- s_user - Users ID in MOR database.
- period_start - Unix timestamp of calls period starting date. (Default: Today at 00:00).
- period_end - Unix timestamp of calls period end date. (Default: Today at 23:59).
- s_call_type - Call type. Possible values [all,answered,no answer,failed,busy]. (Default: all)
- s_device - Device ID in MOR database. Possible values [all, numeric value of device_id]. (Default: all)
- s_provider - Provider ID in MOR database. Possible values [all, numeric value of provider_id]. (Default: all).Only for Admin.
- s_hgc - Hangup cause code ID in MOR database. Possible values [all, numeric value of hangup_cause_code_id]. (Default: all). Only for Admin or Reseller if Show HGC for Resellers is ON
- s_did - Did ID in MOR database. Possible values [all, numeric value of did_id]. (Default: all).Only for Admin.
- s_destination - prefix.
- order_by - Possible values [time,src,dst,prefix,nice_billsec,hgc,server,p_name,p_rate,p_price, reseller, r_rate,r_price,user,u_rate,u_price,number, d_provider, d_inc, d_oener]. (Default: time)
- order_desc - Possible values [0,1]. (Default: 0)
- hash - SHA1 hash constructed using params and API_Secret_Key ( More described in Constructing hash). Required.
- u - Users username. Required.
- p - Users password. Required.
- Returns:
- Errors:
- <error>User was not found</error> - User was not found using user_id. Use correct user_id.
- <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
- Errors:
from MOR 10
add new params
- Params:
- s_provider - for reseller if allow own_providers.
from MOR 11
add new params
- Params:
- only_did - get only calls made via DIDs. Possible values [0,1]. (Default: 0)
- Example:
- We have s_user = 123, API Secret Key = 456789
- /api/user_calls?u=admin&p=admin&s_user=123&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441
* Note that username and password are not included in hash