MOR API conflines update

From Kolmisoft Wiki
Revision as of 08:36, 13 August 2014 by Tester2 (talk | contribs) (Created page with '=Description= <!---This functionality is available from MOR X5---> MOR API changes settings for API, Default User or Default Device. <br><br> =Usage= * Call: /api/confline…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Description

MOR API changes settings for API, Default User or Default Device.

Usage

  • Call: /api/conflines_update
  • Methods: POST, GET(if allowed, not recomended)



Parameters

Parameters which are included into hash:

  • secret_key - API secret key. Required.



Parameters which are not included into hash:

  • u - username for authentication. Required.
  • allow_api - disable api (send 0 to disable). NOTE: you can enable API only in GUI.
  • api_secret_key - change API secret key.
  • default_user_password_length - positive number between 6 and 30 digits.
  • default_user_credit - send -1 for unlimited, 0 and bigger for amount.
  • default_user_balance - send any number to change Default User Balance.
  • default_user_postpaid - send 0 for prepaid, 1 - postpaid.
  • default_user_allow_loss_calls - send 0 for disabled, 1 - enabled.
  • default_user_call_limit - send any positive number.
  • default_user_time_zone - case sensitive value of time zone. to see the full list.
  • default_user_currency - currecny 3 letters code http://wiki.kolmisoft.com/index.php/Currencies#Default_supported_currencies
  • default_user_quickforwards_rule_id
  • default_user_recording_enabled
  • default_user_recording_forced_enabled
  • default_device_call_limit - positive number
  • default_device_canreinvite - ('yes','no','nonat','update','update,nonat')
  • default_device_nat - ('yes','no','never','route','force_rport','comedia')
  • default_device_qualify - ('no', 1000, 1001, 1002.....)
  • default_device_grace_time - positive number
  • default_device_audio_codecs -
  • default_device_video_codecs -
  • 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.



NOTE: reseller is not required to enable API. This method uses admin's API settings.

Request

HTML POST: http://<SERVER_IP>/billing/api/device_update?u=admin&device=2&location_id=7&hash=297dab8c386794b2e947d52affb8f576c643569e



Returns

Success

<page>
  <status>
    <success>Device successfully updated</success>
  </status>
</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> - access not allowed
  • <error>Device was not found</error> - Device id incorrect or does not exist
  • <error>Location was not found</error> - Location id incorrect or does not exist



See also