Difference between revisions of "MOR API Quickforwards get"
From Kolmisoft Wiki
Jump to navigationJump to search
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
=Description= | =Description= | ||
Retrieves owner's list of Quickforward DIDs.<br><br> | Retrieves owner's list of Quickforward DIDs.<br><br> | ||
'''User''' - can get his list of Quickforward DIDs which he is able to use. | '''Simple User''' - can get his list of Quickforward DIDs which he is able to use. | ||
<br> | <br> | ||
=Usage= | =Usage= | ||
Line 16: | Line 17: | ||
===Request=== | ===Request=== | ||
HTML POST: http://<SERVER_IP>/billing/api/quickforwards_dids_get? | HTML POST: http://<SERVER_IP>/billing/api/quickforwards_dids_get?u=USERNAME&hash=HASH | ||
Example: | Example: | ||
If you want find ''username = | If you want find Quickforward DIDs list of ''username = test_user'' | ||
You send: | You send: | ||
http://127.0.0.1/billing/api/quickforwards_dids_get?u= | http://127.0.0.1/billing/api/quickforwards_dids_get?u=test_user&hash=47fc73b6d374bd0a85e3984c1e1623451681569c | ||
<br><br> | <br><br> | ||
Line 33: | Line 34: | ||
''(for example)'' | ''(for example)'' | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<page> | <page> | ||
<quick_forward_did> | <quick_forward_did> | ||
<did>37161112345</did> | <did>37161112345</did> | ||
Line 50: | Line 51: | ||
<description></description> | <description></description> | ||
</quick_forward_did> | </quick_forward_did> | ||
</page> | </page> | ||
'''Errors:''' | '''Errors:''' | ||
* <error> | * <error>Quickforwards list is empty</error> – Quickforwards list is empty. | ||
* <error> | * <error>You are not authorized to use Quickforwards</error> – Such 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 or params while concatenating hash_string. | * <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string. | ||
* <error>User was not found</error> – User was not found using user_id. Use correct user_id. | * <error>User was not found</error> – User was not found using user_id. Use correct user_id. | ||
=See also= | =See also= | ||
* [[MOR API]] | * [[MOR API]] |
Latest revision as of 14:34, 17 February 2014
Description
Retrieves owner's list of Quickforward DIDs.
Simple User - can get his list of Quickforward DIDs which he is able to use.
Usage
- From MOR X4 call: /api/quickforwards_dids_get
- Methods: POST, GET(if allowed, not recomended)
Parameters
- u - username for authentication. Required.
- hash - SHA1 hash constructed using params and API_Secret_Key ( More described in Constructing hash). Required (if setting Disable hash checking is not checked).
Request
HTML POST: http://<SERVER_IP>/billing/api/quickforwards_dids_get?u=USERNAME&hash=HASH
Example:
If you want find Quickforward DIDs list of username = test_user
You send:
http://127.0.0.1/billing/api/quickforwards_dids_get?u=test_user&hash=47fc73b6d374bd0a85e3984c1e1623451681569c
Returns
Success: Everything is ok. You get the list of Quickforward DIDs if there is any:
(for example)
<?xml version="1.0" encoding="UTF-8"?> <page> <quick_forward_did> <did>37161112345</did> <forward_to></forward_to> <description></description> </quick_forward_did> <quick_forward_did> <did>37161112347</did> <forward_to></forward_to> <description></description> </quick_forward_did> <quick_forward_did> <did>37161112349</did> <forward_to></forward_to> <description></description> </quick_forward_did> </page>
Errors:
- <error>Quickforwards list is empty</error> – Quickforwards list is empty.
- <error>You are not authorized to use Quickforwards</error> – Such 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 or params while concatenating hash_string.
- <error>User was not found</error> – User was not found using user_id. Use correct user_id.