M2 API quickstats get

From Kolmisoft Wiki

Jump to: navigation, search


[edit] Description

Retrieves Quick Stats and Active Calls for today and a current month

Data can be retrieved for the System Admin, Manager and a Simple User.
Note Manager can retrieve data only if have permission to manage DASHBOARD> Quick Stats

Simpe User Notes:

  • Active Calls can be retrieved for Simple Users only if a Setting: MAINTENANCE > Settings > Show Active Calls for Users is on.
  • Simple users can only see the amount of Calls, Call Duration, Call Price, and their Balance.

[edit] Usage

  • M2 call: /api/quickstats_get
  • Methods: POST, GET(if allowed, not recomended)

[edit] Parameters

Note that u is included in to the HASH only if u is not the System Admin

[edit] Request

If API Secret Key = secret

You send:

HTML POST: http://<SERVER_IP>/billing/api/quickstats_get?u=admin&hash=e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4

* Note that username (u) is not included in the hash

[edit] Returns

Success: Everything is ok. You get the list of calls if there is any:

<?xml version="1.0" encoding="UTF-8"?>


  • <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> – user with such username cannot use this method
  • <error>Bad login</error> – such username does not exist in the database or it was not specified
  • <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string
  • <error>Cannot connect to Elasticsearch</error> – data is not reachable


   <error>API Requests are disabled</error>

[edit] See also

Personal tools


Try M2