Difference between revisions of "MOR API CLI info get"

From Kolmisoft Wiki
Jump to navigationJump to search
Line 1: Line 1:
=Description=
<!---This functionality is available from MOR X4--->
<!---This functionality is available from MOR X4--->
[[MOR API]] CLI get info
[[MOR API]] CLI get info
Please note that admin/reseller can retrieve CLI info just for their own Users Devices.
<br><br>
<br><br>
----
=Usage=
 
* Call: /api/cli_info_get
 
<br><br>
===Parametres===


* Call: /api/cli_get_info
* u – username to login. '''Required'''.
* Params:
* cli – this specifies CLI number whose info to show.
** u – username to login. '''Required'''.
* [[MOR API hash construction | hash]] – SHA1 hash constructed using '''user_id''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.
** p – password to login. '''Required'''.
** cli – this specifies CLI number whose info to show.
** [[MOR API hash construction | hash]] – SHA1 hash constructed using '''user_id''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.




Returning XML is put in file. That file is gziped and returned as a response content.
Returning XML is put in file. That file is gziped and returned as a response content.
<br><br>
===Request===


Please note that admin/reseller can retrieve CLI info just for their own Users Devices.
We have API Secret Key = 456789, user_id = 12345
We send:
 
HTML POST: http://<server_ip>/api/cli_get_info?u=admin&p=admin&cli=12345&hash=71516eea4850f7e0300ac86adf9fb64bca845aa7


'''* Note that username and password are not included in hash'''
<br><br>
===Returns===


* Errors:
'''Success'''
** <error>CLI not found</error> – CLI was not found.
** <error>CLI is empty</error> – CLI was not sent.
** <error>Bad login</error> – User was not found by username and password. Use correct username and password. Make sure that username (u) and password (p) are specified.
** <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.


* Returns:
  <page>
  <page>
   <cli>
   <cli>
Line 36: Line 44:
----
----


*Example:
'''Errors'''
**We have API Secret Key = 456789, user_id = 12345
 
**Hash string to be converted: "100456789"
* <error>CLI not found</error> – CLI was not found.
**We send:
* <error>CLI is empty</error> – CLI was not sent.
***/api/cli_get_info?u=admin&p=admin&cli=12345&hash=71516eea4850f7e0300ac86adf9fb64bca845aa7
* <error>Access Denied</error> – User was not found by username and password. Use correct username and password. Make sure that username (u) and password (p) are specified.
'''* Note that username and password are not included in hash'''
* <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
<br><br>
<br><br>
=See also=
=See also=


* [[MOR API]]
* [[CLIs (Incoming CallerIDs)]]
* [[CLIs (Incoming CallerIDs)]]

Revision as of 13:13, 23 May 2013

Description

MOR API CLI get info

Please note that admin/reseller can retrieve CLI info just for their own Users Devices.

Usage

  • Call: /api/cli_info_get



Parametres


Returning XML is put in file. That file is gziped and returned as a response content.

Request

We have API Secret Key = 456789, user_id = 12345 We send:

HTML POST: http://<server_ip>/api/cli_get_info?u=admin&p=admin&cli=12345&hash=71516eea4850f7e0300ac86adf9fb64bca845aa7

* Note that username and password are not included in hash

Returns

Success

<page>
  <cli>
    <device>
      <user_id>2</user_id>
      <device_id>2</device_id>
     </device>
   </cli>
</page>




Errors

  • <error>CLI not found</error> – CLI was not found.
  • <error>CLI is empty</error> – CLI was not sent.
  • <error>Access Denied</error> – User was not found by username and password. Use correct username and password. Make sure that username (u) and password (p) are specified.
  • <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.



See also