Difference between revisions of "M4 API user details raw get"
From Kolmisoft Wiki
Jump to navigationJump to search
(2 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
* '''Admin''' | * '''Admin''' | ||
* '''Manager''' with appropriate permissions. If the '''Show only assigned Users''' option is enabled, | * '''Manager''' with appropriate permissions. If the '''Show only assigned Users''' option is enabled, then Manger can retrieve details only for assigned Users. | ||
Both '''Admin''' and '''Manager''' cannot retrieve details of their accounts. | Both '''Admin''' and '''Manager''' cannot retrieve details of their accounts. | ||
Line 34: | Line 34: | ||
You send: | You send: | ||
HTML POST: http://<SERVER_IP>/billing/api/ | HTML POST: http://<SERVER_IP>/billing/api/user_details_raw_get?u=admin&user_id=5&hash=80ea571b1932bfecb937013966849154cb995e05 | ||
<br><br> | <br><br> |
Latest revision as of 08:22, 21 February 2024
Description
API returns raw User details from the DB.
Fields two_fa_authenticator_secret, password, uniquehash are omitted from the response.
API can be used by:
- Admin
- Manager with appropriate permissions. If the Show only assigned Users option is enabled, then Manger can retrieve details only for assigned Users.
Both Admin and Manager cannot retrieve details of their accounts.
Usage
- M4 call: /api/user_details_raw_get
- Methods: POST, GET(if allowed, not recomended)
Parameters
Parameters that are included in the hash
- u - username to login. Required.
- user_id - specify the ID of the user to list user details. Required.
- hash – SHA1 hash constructed using API Secret Key ( More described in Constructing hash). Required.
Request
If API Secret Key = secret
You send:
HTML POST: http://<SERVER_IP>/billing/api/user_details_raw_get?u=admin&user_id=5&hash=80ea571b1932bfecb937013966849154cb995e05
Returns
<?xml version="1.0" encoding="UTF-8"?> <page>
<status> <user> <id>...</id> <username>...</username> <usertype>...</usertype> <logged>...</logged> <first_name>...</first_name> <last_name>...</last_name> <calltime_normative>...</calltime_normative> <show_in_realtime_stats>...</show_in_realtime_stats> <balance>...</balance> <frozen_balance>...</frozen_balance> <lcr_id>...</lcr_id> <postpaid> ...</postpaid> <blocked>...</blocked> <tariff_id>...</tariff_id> <month_plan_perc>...</month_plan_perc> <month_plan_updated>...</month_plan_updated> <sales_this_month>...</sales_this_month> <sales_this_month_planned>...</sales_this_month_planned> <show_billing_info>...</show_billing_info> <primary_device_id>...</primary_device_id> <credit>...</credit> <clientid>...</clientid> <agreement_number>...</agreement_number> <agreement_date>...</agreement_date> <language>...</language> <taxation_country>...</taxation_country> <vat_number>...</vat_number> <vat_percent>...</vat_percent> <address_id>...</address_id> <accounting_number>...</accounting_number> <owner_id>...</owner_id> <hidden>...</hidden> <allow_loss_calls>...</allow_loss_calls> <vouchers_disabled_till>...</vouchers_disabled_till> <temporary_id>...</temporary_id> <send_invoice_types>...</send_invoice_types> <call_limit>...</call_limit> <sms_tariff_id>...</sms_tariff_id> <sms_lcr_id> </sms_lcr_id> <sms_service_active>...</sms_service_active> <cyberplat_active>...</cyberplat_active> <call_center_agent>...</call_center_agent> <generate_invoice>...</generate_invoice> <tax_1>...</tax_1> <tax_2>...</tax_2> <tax_3>...</tax_3> <tax_4>...</tax_4> <block_at>...</block_at> <block_at_conditional>...</block_at_conditional> <block_conditional_use>...</block_conditional_use> <recording_enabled>...</recording_enabled> <recording_forced_enabled>...</recording_forced_enabled> <recordings_email>...</recordings_email> <recording_hdd_quota>...</recording_hdd_quota> <warning_email_active>...</warning_email_active> <warning_email_balance>...</warning_email_balance> <warning_email_sent>...</warning_email_sent> <tax_id>...</tax_id> <invoice_zero_calls>...</invoice_zero_calls> <acc_group_id>...</acc_group_id> <hide_destination_end>...</hide_destination_end> <warning_email_hour>...</warning_email_hour> <warning_balance_call>...</warning_balance_call> <warning_balance_sound_file_id>...</warning_balance_sound_file_id> <own_providers>...</own_providers> <currency_id>...</currency_id> <quickforwards_rule_id>...</quickforwards_rule_id> <spy_device_id>...</spy_device_id> <time_zone>...</time_zone> <minimal_charge>...</minimal_charge> <minimal_charge_start_at>...</minimal_charge_start_at> <webphone_allow_use>...</webphone_allow_use> <webphone_device_id>...</webphone_device_id> <responsible_accountant_id>...</responsible_accountant_id> <blacklist_enabled>...</blacklist_enabled> <blacklist_lcr>...</blacklist_lcr> <routing_threshold>.../routing_threshold> <pbx_pool_id>...</pbx_pool_id> <hide_non_answered_calls>...</hide_non_answered_calls> <balance_min>...</balance_min> <balance_max>...</balance_max> <routing_threshold_2>...</routing_threshold_2> <blacklist_lcr_2>...</blacklist_lcr_2> <routing_threshold_3>...</routing_threshold_3> <blacklist_lcr_3>...</blacklist_lcr_3> <main_email>...</main_email> <noc_email>...</noc_email> <billing_email>...</billing_email> <rates_email>...</rates_email> <warning_email_balance_admin>...</warning_email_balance_admin> <warning_email_balance_manager>...</warning_email_balance_manager> <billing_period>...</billing_period> <invoice_grace_period>...</invoice_grace_period> <warning_email_sent_admin>...</warning_email_sent_admin> <warning_email_sent_manager>...</warning_email_sent_manager> <comment>...</comment> <warning_balance_increases>...</warning_balance_increases> <ignore_global_alerts>...</ignore_global_alerts> <manager_group_id>...</manager_group_id> <phone>...</phone> <enable_static_list>...</enable_static_list> <static_list_id>...</static_list_id> <enable_static_source_list>...</enable_static_source_list> <static_source_list_id>...</static_source_list_id> <generate_invoice_manually>...</generate_invoice_manually> <show_hangupcause>...</show_hangupcause> <max_call_rate>...</max_call_rate> <password_changed_at> </password_changed_at> <show_only_assigned_users>...</show_only_assigned_users> <billing_dynamic_from>...</billing_dynamic_from> <billing_dynamic_days>...</billing_dynamic_days> <billing_run_at>...</billing_run_at> <send_warning_balance_sms>...</send_warning_balance_sms> <billing_dynamic_generation_time>...</billing_dynamic_generation_time> <generate_prepaid_invoice>...</generate_prepaid_invoice> <web_address>...</web_address> <price_protection>...</price_protection> <min_rate_margin>...</min_rate_margin> <min_rate_margin_percent>...</min_rate_margin_percent> <digits_used_for_price>...</digits_used_for_price> <digits_rounding_method>...</digits_rounding_method> <user_status>...</user_status> <changes_present>...</changes_present> <enforce_daily_limit>...</enforce_daily_limit> <daily_spend_limit_reached>...</daily_spend_limit_reached> <daily_spend_warning_reached>...</daily_spend_warning_reached> <daily_spend_warning_email_sent>...</daily_spend_warning_email_sent> <daily_spend_limit>...</daily_spend_limit> <daily_spend_warning>...</daily_spend_warning> <kill_calls_in_progress>...</kill_calls_in_progress> <show_daily_limit>...</show_daily_limit> <allow_customer_to_edit>...</allow_customer_to_edit> <daily_spend_limit_last_reset_at>...</daily_spend_limit_last_reset_at> <kill_calls_in_progress_flag>...</kill_calls_in_progress_flag> <allow_paypal>...</allow_paypal> <paypal_need_approval>...</paypal_need_approval> <paypal_credit_selection>...</paypal_credit_selection> <paypal_fee_selection>...</paypal_fee_selection> <paypal_charge_fee_on_entered_amount>...</paypal_charge_fee_on_entered_amount> <paypal_charge_fee_on_net_amount>...</paypal_charge_fee_on_net_amount> <paypal_do_not_send_confirmation_email>...</paypal_do_not_send_confirmation_email> <rate_notification_template_id>...</rate_notification_template_id> <two_fa_enabled>...</two_fa_enabled> <hide_financial_data_in_quick_stats>...</hide_financial_data_in_quick_stats> <round_call_price_in_cdr>...</round_call_price_in_cdr> <show_calls_statistics_for_last_days>...</show_calls_statistics_for_last_days> <time_format>...</time_format> <show_quick_stats>...</show_quick_stats> <two_fa_authentication_method>...</two_fa_authentication_method> <two_fa_authenticator_verified>...</two_fa_authenticator_verified> <two_fa_authenticator_last_otp_at>...</two_fa_authenticator_last_otp_at> </user> </status>
</page>
Errors:
- <error>API Requests are disabled</error> – Allow API globally setting is unchecked
- <error>GET Requests are disabled</error> – Allow GET API setting is unchecked
- <error>Access Denied</error> – The user is not allowed to get User details or the username and password are not correct.
- <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and the order of parameters while concatenating the hash_string
- <error>You are not authorized to view this page</error> – User is not authorized to get users list.
- <error>User was not found</error> – User was not found.
Example:
<status> <error>API Requests are disabled</error> </status>