MOR API recordings get

From Kolmisoft Wiki
Revision as of 10:36, 29 March 2016 by Zilvinas (talk | contribs) (Created page with '<!---This functionality is available from MOR 7---> =Description= MOR API for getting MOR recordings <br><br> =Usage= * From '''MOR X7''' call: /api/recordings_g…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description

MOR API for getting MOR recordings

Usage

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



Parameters

  • u - username to login. Required.
  • hash – SHA1 hash constructed using API Secret Key ( More described in Constructing hash). Required.
  • date_from - Date from which recordings start. If not used, this parameter will be set to today's date 00:00:00.
  • date_till - Date when recordings end. If not used, this parameter will be set to today's date 23:59:59.
  • destination - Destination to which recordings were made.
  • source - Source from which recordings were made.
  • user - User who made recordings.
  • device - Device which has been used by User to make recordings.



Request

If API Secret Key = secret

You send:

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

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

Returns

<?xml version="1.0" encoding="UTF-8"?>
<page>
 <status>
  <recordings>
   <recording>
    <id> ... </id>
    <user_id> ... </user_id>
    <dst_user_id> ... </dst_user_id>
    <src_device_id> ... </src_device_id>
    <dst_device_id> ... </dst_device_id>
    <date> ... </date>
    <comment> ... </comment>
    <duration> ... </duration>
 ...
    <destination> ... </destination>
    <size> ... </size>
   </recording>
  </recordings>
</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> – User with such a username cannot use this method or such a 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 of parameters while concatenating the hash_string
  • <error>No Recordings found</error> – There are no recordings with given parameters.
  • <error>Date from is incorrect format</error> – Date from must be used in Unix time stamp format.
  • <error>Date till is incorrect format</error> – Date till must be used in Unix time stamp format.
  • <error>Date from is greater than date till</error> – Date from can not be bigger than date till.

Example:

 <status>
   <error>API Requests are disabled</error>
 </status>



See also