Difference between revisions of "MOR API user calls get"
From Kolmisoft Wiki
Jump to navigationJump to search
m |
|||
Line 14: | Line 14: | ||
==[[MOR 8 documentation | MOR 8]]== | |||
---- | ---- | ||
<br><br> | <br><br> | ||
Line 33: | Line 34: | ||
*** <error>User was not found</error> - User was not found using user_id. Use correct user_id. | *** <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. | *** <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string. | ||
== from[[MOR 9 documentation | MOR 9]]== | |||
---- | |||
<br><br> | |||
* Call: /api/user_calls | |||
* Methods: POST, GET(if allowed, not recomended) | |||
* Params: | |||
** s_user - 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). | |||
** 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) | |||
** [[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. | |||
** 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. | |||
== from [[MOR 10 documentation | MOR 10]] == | |||
---- | |||
<br><br> | |||
add new params | |||
* Params: | |||
** s_provider - for reseller if allow own_providers. |
Revision as of 11:36, 31 May 2011
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.
- <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. 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).
- 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.