Difference between revisions of "MOR API dids get"
From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with '=Description= MOR API DIDs get <br><br> =Usage= * Call: /api/dids_get * Methods: POST, GET(if allowed, not recomended) <br><br> ===Parametres=== * '''[[MOR API hash constr…') |
|||
Line 38: | Line 38: | ||
'''Success''' | '''Success''' | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<page> | <page> | ||
<dids> | |||
<did> | <did> | ||
<did>3706xxxx</did> | <did>3706xxxx</did> | ||
Line 63: | Line 63: | ||
<tone_zone></tone_zone> | <tone_zone></tone_zone> | ||
</did> | </did> | ||
</dids> | |||
</page> | </page> | ||
---- | ---- |
Revision as of 07:49, 31 July 2014
Description
MOR API DIDs get
Usage
- Call: /api/dids_get
- Methods: POST, GET(if allowed, not recomended)
Parametres
- hash - SHA1 hash constructed using API_Secret_Key ( More described in Constructing hash). Required.
- u - username for authentication. Required.
- search_did_number - DID number
- search_status - free, reserved, active, closed, terminated
- search_did_owner - text
- search_dialplan - dialplan_id
- search_user - user_id
- search_device - device_id
- search_provider - provider_id
- search_language - word which is used in DIDs configuration as languege
- search_hide_terminated_dids - 1 - hide, 0 - show
Request
We have search_status = free, API Secret Key = secret
We send:
HTML POST: http://<SERVER_IP>/billing/api/dids_get?u=admin&search_status=free&hash=6e79d4a82f68102f43be11d873177f47817f84df
- Now we can find free DIDs in GUI DIDs list.
* Note that username are not included in hash
Returns
Success
<?xml version="1.0" encoding="UTF-8"?> <page> <dids> <did> <did>3706xxxx</did> <provider>Test Provider</provider> <language>en</language> <status>Free</status> <owner>System Admin</owner> <device></device> <dial_plan></dial_plan> <simultaneous_call_limit>Unlimited</simultaneous_call_limit> <tone_zone></tone_zone> </did> <did> <did>3706xxxxx</did> <provider>Test Provider</provider> <language>en</language> <status>Free</status> <owner>System Admin</owner> <device></device> <dial_plan></dial_plan> <simultaneous_call_limit>Unlimited</simultaneous_call_limit> <tone_zone></tone_zone> </did> </dids> </page>
Errors
- <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
- <error>Access Denied</error> - User with UNIQUEHASH not found or params id not send. Enter correct id.
- <error>No DIDs found</error> - No DIDs found
Example:
<?xml version="1.0" encoding="UTF-8"?> <page> <error>Error message</error> </page>