Difference between revisions of "M4 API cp create"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with "=Description= M4 API Device (Connection Point) create <br><br> =Usage= * Call: '''/api/cp_create''' * Methods: POST, GET(if allowed, not recomended) <br><br> ===Parameters=== * u - username for authentication. '''Required'''. * user_id – user id. '''Required'''. * description * ipaddr - IP for Authentication * op - act as origination point. 0 stands for "No", 1 stands for "Yes" * tp - act as termination point. 0 stands for "No", 1 stands for "Yes" * create_rg_for_o...")
 
 
(One intermediate revision by one other user not shown)
Line 26: Line 26:
We send:
We send:


  HTML POST: http://<SERVER_IP>/billing/api/billing/api/cp_create?u=admin&user_id=2&op=1&hash=65fd575c441513bd114b84c7dbdb01e0f2716d27
  HTML POST: http://<SERVER_IP>/billing/api/cp_create?u=admin&user_id=2&op=1&hash=65fd575c441513bd114b84c7dbdb01e0f2716d27


'''* Note that username is not included in hash'''
'''* Note that username is not included in hash'''
Line 43: Line 43:


<br><br>
<br><br>
=See also=
=See also=


* [[M2 API]]
* [[M4 API]]

Latest revision as of 11:27, 28 November 2022

Description

M4 API Device (Connection Point) create

Usage

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



Parameters

  • u - username for authentication. Required.
  • user_id – user id. Required.
  • description
  • ipaddr - IP for Authentication
  • op - act as origination point. 0 stands for "No", 1 stands for "Yes"
  • tp - act as termination point. 0 stands for "No", 1 stands for "Yes"
  • create_rg_for_op - Automaticlly create Routing Group for this OP. 0 stand for "No", 1 stands for "Yes"



Request

We have API Secret Key = 456789, user_id = 2

We send:

HTML POST: http://<SERVER_IP>/billing/api/cp_create?u=admin&user_id=2&op=1&hash=65fd575c441513bd114b84c7dbdb01e0f2716d27

* Note that username is not included in hash

Returns

Success

<?xml version="1.0" encoding="UTF-8"?> <page>

 <status>
   <success>Connection Point created</success>
 </status>

</page>




See also