Difference between revisions of "MOR API lcrs get"
From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with "=Description= MOR API Retrieve list of LCRs <br><br> =Usage= * Call: /api/lcrs_get * Methods: POST, GET(if allowed, not recomended) <br><br> ===Parameters=== Parameters which are '''included''' into hash: * '''u''' - username for authentication. '''Required'''. '''Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key''' <br><br> Parameters which are '''not included''' into hash: *...") |
m |
||
Line 29: | Line 29: | ||
We send: | We send: | ||
HTML POST: http://<SERVER_IP>/billing/api/lcrs_get?u=admin | HTML POST: http://<SERVER_IP>/billing/api/lcrs_get?u=admin&s_name=BLANK&hash=6e79d4a82f68102f43be11d873177f47817f84df | ||
<br><br> | <br><br> |
Latest revision as of 08:03, 20 June 2022
Description
MOR API Retrieve list of LCRs
Usage
- Call: /api/lcrs_get
- Methods: POST, GET(if allowed, not recomended)
Parameters
Parameters which are included into hash:
- u - username for authentication. Required.
Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key
Parameters which are not included into hash:
- hash - SHA1 hash constructed using parameters which are listed above. Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key ( More described in Constructing hash). Required.
- s_name - name of LCR to be listed.
Request
We have u = admin, s_name = BLANK
We send:
HTML POST: http://<SERVER_IP>/billing/api/lcrs_get?u=admin&s_name=BLANK&hash=6e79d4a82f68102f43be11d873177f47817f84df
Returns
Success
<?xml version="1.0" encoding="UTF-8"?> <page> <lcrs> <lcr> <id>2</id> <name>BLANK</name> <order>price</order> <first_provider_percent_limit>0.0</first_provider_percent_limit> <failover_provider_id/> <no_failover>0</no_failover> <minimal_rate_margin_percent>0.0</minimal_rate_margin_percent> <quality_routing_id>-1</quality_routing_id> <allow_loss_calls>0</allow_loss_calls> </lcr> </lcrs> </page>
Errors
- <error>You are not authorized to use this functionality</error>
- <error>Access Denied</error>
- <error>No LCRs found</error>
- <message>problem message</message>
Example:
<?xml version="1.0" encoding="UTF-8"?> <page> <error>Error message</error> </page>