Difference between revisions of "M4 API number pools get"

From Kolmisoft Wiki
Jump to navigationJump to search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Description=
=Description=
[[M2 API]] for getting the list of number pools.
API for getting the list of number pools.




Line 7: Line 7:


* From '''M4''' call: '''/api/number_pools_get'''
* From '''M4''' call: '''/api/number_pools_get'''
* Methods: POST, GET(if allowed, not recomended)
* Methods: POST, GET(if allowed, not recommended)
<br><br>
<br><br>
===Parametres===
===Parametres===


* u - username to login. '''Required'''.
* u - username to log in. '''Required'''.
* number_pool_id - Retrieve specific Number Pool by ID, if this parameter is not used, all Number Pools are retrieved based on the owner (from u param).
* number_pool_id - Retrieve specific Number Pool by ID, if this parameter is not used, all Number Pools are retrieved based on the owner (from u param).
* show_numbers - Show all Number Pool's Numbers, value must be "1"
* show_numbers - Show all Number Pool's Numbers, the value must be "1"
* number_limit_row_count - must be integer value higher than 0
** Settings used when show_numbers=1:
* number_limit_offset - must be integer value higher than or equal to 0
*** number_limit_row_count - specifies how many numbers to include. Must be an integer value higher than 0
*** number_limit_offset - specifies how many numbers to skip (not from the first, but to skip n entries). Must be an integer value higher than or equal to 0
* [[MOR API hash construction | hash]] – SHA1 hash constructed using '''API Secret Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.
* [[MOR API hash construction | hash]] – SHA1 hash constructed using '''API Secret Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.
<br><br>
<br><br>
Line 44: Line 45:
     </status>
     </status>
   </page>
   </page>
<br><br>
=See also=
* [[M4 API]]

Latest revision as of 11:27, 28 November 2022

Description

API for getting the list of number pools.




Usage

  • From M4 call: /api/number_pools_get
  • Methods: POST, GET(if allowed, not recommended)



Parametres

  • u - username to log in. Required.
  • number_pool_id - Retrieve specific Number Pool by ID, if this parameter is not used, all Number Pools are retrieved based on the owner (from u param).
  • show_numbers - Show all Number Pool's Numbers, the value must be "1"
    • Settings used when show_numbers=1:
      • number_limit_row_count - specifies how many numbers to include. Must be an integer value higher than 0
      • number_limit_offset - specifies how many numbers to skip (not from the first, but to skip n entries). Must be an integer value higher than or equal to 0
  • hash – SHA1 hash constructed using API Secret Key ( More described in Constructing hash). Required.



Request

If API Secret Key = secret

You send:

HTML POST: http://<SERVER IP>/billing/api/number_pools_get?u=admin&hash=e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4



Returns

Success

<?xml version="1.0" encoding="UTF-8"?>
 <page>
   <status>
     <number_pools>
       <number_pool>
         <id>1</id>
         <name>Test</name>
         <comment></comment>
         <owner_id>0</owner_id>
       </number_pool>
     </number_pools>
   </status>
 </page>



See also