Difference between revisions of "MOR API device clis get"
From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with '=Description= <!---This functionality is available in MOR X5 and MOR X6---> MOR API Device clis get Please note that only admins users and admin can use this API. <br><br>…') |
|||
Line 35: | Line 35: | ||
'''Success''' | '''Success''' | ||
<page> | <page> | ||
<status> | <status> | ||
<cli_id>3</cli_id> | <cli_id>3</cli_id> | ||
Line 47: | Line 47: | ||
<cli_banned>0</cli_banned> | <cli_banned>0</cli_banned> | ||
</status> | </status> | ||
</page> | </page> | ||
Revision as of 13:39, 1 September 2015
Description
MOR API Device clis get
Please note that only admins users and admin can use this API.
Usage
- Call: /api/voucher_use
- Methods: POST, GET(if allowed, not recomended)
Parametres
- u – username to login. Required.
- devices_id – this is the id of users device. Optional.
- users_id - this is the id of the user whose CLIs will be selected. Optional
- hash – SHA1 hash constructed using API_Secret_Key ( More described in Constructing hash). Required.
Request
We have API Secret Key = secret
We send:
HTML POST: http://<server_ip>/billing/api/device_clis_get?u=admin&devices_id=6&users_id=3&e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4
* Note that username and password are not included in hash
Returns
Success
<page> <status> <cli_id>3</cli_id> <cli_cli>45456464</cli_cli> <cli_device>IAX2/ipauth4aa73a4300</cli_device> <cli_description>Test Reseller</cli_description> <cli_added_at>2015-08-31 12:40:23 +0300</cli_added_at> <cli_updated_at>2015-08-31 16:14:48 +0300</cli_updated_at> <cli_comment>rhrtghg</cli_comment> <cli_email_callback>0</cli_email_callback> <cli_banned>0</cli_banned> </status> </page>
Errors
- <error>Device was not found</error> – Device was not found.
- <error>CLIs were not found</error> – No CLIs found.
- <error>Access Denied</error> – username (u) is not found.
- <error>You are not authorized to use this functionality</error> – username (u) is reseller or accountant without permissions.
- <error>User was not found</error> – specified user via user_id does not exist.
- <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.