and HOW-TO

You can use API VPNKI for any automatic functions in you applications or systems.

We use API authorization by special key that you can find in a bottom of your page. API will send you answer in JSON format.



API part 1. Statistics

Use HTTP GET method

1.1. List of all your tunnels

List of all your tunnels. Request format:

https://vpnki.com/index.php/en/?option=com_api&format=raw&app=webservices&resource=tunnels&key=<user key>


1.2. List of all active tunnels in your account

List of all active tunnels at this moment. Request format:
https://vpnki.com/index.php/en/?option=com_api&format=raw&app=webservices&resource=active&key=<user key>

1.3. Statistic of all tunnels connections in your account

View list of all tunnels connections in time range. Request format:
https://vpnki.com/index.php/en/?option=com_api&format=raw&app=webservices&resource=stat_user&key=<user key>&ts=0000-00-00 00-00-00&te=2016-12-12 00-00-00

Where, ts - date and time of start of interval

te - date and time of end of interval.

Example format: 2015-12-31 23-59-59

1.4. Statistic of connections by selected tunnel in your account in time range

View list of selected tunnel connections in time range. Request format:
https://vpnki.com/index.php/en/?option=com_api&format=raw&app=webservices&resource=stat_tunnel&key=<user key>&tunnel=<tunnel name>&ts=2016-10-10 00-00-00&te=2016-10-18 00-00-00

Where, tunnel name - name of tunnel, for example user356,

ts - date and time of start of interval,

te - date and time of end of interval. You can use word NOW.

Example: 2015-12-31 23-59-59


API part 2. Tunnels management

This part is developed for automation management of tunnels. This part is available only for users with a special Priority status (contact us if you need this).

Use HTTP GET method

2.1. Create a new tunnel in your account

You can create a new tunnel (you will receive back username and password for tunnel).

https://vpnki.com/index.php/en/?option=com_api&format=raw&app=webservices&resource=add_tunnel&key=<user key>


2.2. Delete a tunnel in your account

Delete selected tunnel in your account.

https://vpnki.com/index.php?option=com_api&format=raw&app=webservices&resource=del_tunnel&key=<user key>&tunnel=user657

You will receive OK status if operation was successful.