MOR API queue log get

From Kolmisoft Wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Description

MOR API for getting MOR queue log.




Usage

  • From MOR X10 call: /api/queue_log_get
  • Methods: POST, GET(if allowed, not recomended)



Parametres

  • 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.
  • queuename - name of queue.
  • callid - call id.
  • agent - name of agent (for example: Local/1001@mor_local).
  • event – type of event Queue Log.
  • data1 – value for data 1.
  • data2 – value for data 2.
  • data3 – value for data 3.
  • data4 – value for data 4.
  • data5 – value for data 5.



Request

If API Secret Key = secret

You send:

HTML POST: http://<SERVER IP>/billing/api/queue_log_get?u=admin&hash=e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4

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

Returns

Success

<?xml version="1.0" encoding="UTF-8"?>
<page>
 <queues>
   <queue>
     <id>8</id>
     
     <call_id>1490020149.20</call_id>
     <queue_name>queue_mano</queue_name>
     <agent>NONE</agent>
     <event>ENTERQUEUE</event>
     <data1></data1>
     <data2>100001</data2>
     <data3>1</data3>
     <data4></data4>
     <data5></data5>
   </queue>
   <queue>
     <id>9</id>
     
     <call_id>1490020149.20</call_id>
     <queue_name>queue_mano</queue_name>
     <agent>Local/1001@mor_local</agent>
     <event>CONNECT</event>
     <data1>6</data1>
     <data2>1490020149.23</data2>
     <data3>5</data3>
     <data4></data4>
     <data5></data5>
   </queue>
   <queue>
     <id>10</id>
     
     <call_id>1490020149.20</call_id>
     <queue_name>queue_mano</queue_name>
     <agent>Local/1001@mor_local</agent>
     <event>COMPLETEAGENT</event>
     <data1>6</data1>
     <data2>10</data2>
     <data3>1</data3>
     <data4></data4>
     <data5></data5>
   </queue>
 </queues>
</page>




Errors

<?xml version="1.0" encoding="UTF-8"?>
<status>
  <error>Incorrect hash</error>
</status>
<?xml version="1.0" encoding="UTF-8"?>
<page>
 <status>
   <error>No data found</error>
 </status>
</page>
<?xml version="1.0" encoding="UTF-8"?>
<page>
 <status>
   <error>Access Denied</error>
 </status>
</page>



See also