List VPN servers
curl --request GET \
--url https://demo.onlinebillingform.com/api/v2/vpn/servers/list \
--header 'Authorization: Bearer <token>'import requests
url = "https://demo.onlinebillingform.com/api/v2/vpn/servers/list"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://demo.onlinebillingform.com/api/v2/vpn/servers/list', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://demo.onlinebillingform.com/api/v2/vpn/servers/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://demo.onlinebillingform.com/api/v2/vpn/servers/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://demo.onlinebillingform.com/api/v2/vpn/servers/list")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo.onlinebillingform.com/api/v2/vpn/servers/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"vpn_systems": {
"data": [
{
"id": 30,
"server_name": "Europe VPN 01",
"ip_address": "10.0.0.30",
"ssh_port": 22,
"ssh_username": "root",
"max_connections": null,
"vpn_type": "openVPN",
"flag_countries": "AD",
"status_online": 1,
"is_disabled": false,
"connections_count": 1
}
],
"current_page": 1,
"first_page_url": "https://demo.onlinebillingform.com/api/v2/vpn/servers/list?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://demo.onlinebillingform.com/api/v2/vpn/servers/list?page=1",
"next_page_url": null,
"path": "https://demo.onlinebillingform.com/api/v2/vpn/servers/list",
"per_page": 15,
"prev_page_url": null,
"to": 1,
"total": 1
},
"server_groups": [
{
"id": "c49f2148-adf3-469c-b1ca-5d68e28e7efb",
"name": "Europe",
"servers": []
},
{
"id": "f584646b-7a83-42e8-b444-30f26b1d7696",
"name": "USA",
"servers": [
{
"id": 30,
"server_name": "Europe VPN 01",
"ip_address": "10.0.0.30",
"vpn_type": "openVPN",
"flag_countries": "AD",
"status_online": true,
"is_disabled": false,
"connections_count": 1
}
]
}
]
}{
"success": false,
"errors": {
"per_page": [
"The per page field must not be greater than 100."
]
}
}{
"success": false,
"errors": "Invalid API Key"
}{
"success": false,
"errors": "Insufficient permissions for this endpoint."
}VPN
List VPN servers
Returns the paginated VPN server list together with the ordered server-group representation used by VPN applications. The order of server_groups matches the order configured in VPN Deploy, and the order of each group’s servers array matches the configured server order. Only online, enabled servers are included. Configured groups remain present when empty. An Other group is appended only when ungrouped available servers exist.
GET
/
vpn
/
servers
/
list
List VPN servers
curl --request GET \
--url https://demo.onlinebillingform.com/api/v2/vpn/servers/list \
--header 'Authorization: Bearer <token>'import requests
url = "https://demo.onlinebillingform.com/api/v2/vpn/servers/list"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://demo.onlinebillingform.com/api/v2/vpn/servers/list', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://demo.onlinebillingform.com/api/v2/vpn/servers/list",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://demo.onlinebillingform.com/api/v2/vpn/servers/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://demo.onlinebillingform.com/api/v2/vpn/servers/list")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo.onlinebillingform.com/api/v2/vpn/servers/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"vpn_systems": {
"data": [
{
"id": 30,
"server_name": "Europe VPN 01",
"ip_address": "10.0.0.30",
"ssh_port": 22,
"ssh_username": "root",
"max_connections": null,
"vpn_type": "openVPN",
"flag_countries": "AD",
"status_online": 1,
"is_disabled": false,
"connections_count": 1
}
],
"current_page": 1,
"first_page_url": "https://demo.onlinebillingform.com/api/v2/vpn/servers/list?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://demo.onlinebillingform.com/api/v2/vpn/servers/list?page=1",
"next_page_url": null,
"path": "https://demo.onlinebillingform.com/api/v2/vpn/servers/list",
"per_page": 15,
"prev_page_url": null,
"to": 1,
"total": 1
},
"server_groups": [
{
"id": "c49f2148-adf3-469c-b1ca-5d68e28e7efb",
"name": "Europe",
"servers": []
},
{
"id": "f584646b-7a83-42e8-b444-30f26b1d7696",
"name": "USA",
"servers": [
{
"id": 30,
"server_name": "Europe VPN 01",
"ip_address": "10.0.0.30",
"vpn_type": "openVPN",
"flag_countries": "AD",
"status_online": true,
"is_disabled": false,
"connections_count": 1
}
]
}
]
}{
"success": false,
"errors": {
"per_page": [
"The per page field must not be greater than 100."
]
}
}{
"success": false,
"errors": "Invalid API Key"
}{
"success": false,
"errors": "Insufficient permissions for this endpoint."
}Authorizations
Use Authorization: Bearer <live_api_key>.
Query Parameters
Number of records returned in the vpn_systems pagination object. This does not paginate server_groups.
Required range:
1 <= x <= 100⌘I