REST API v2 Triple play (Internet, IPTV, VoIP)

You are here:
< All Topics

REST API v2 Provisioning

Document date2025.05.27
Tested with ONT HALNy HL-4GMV2/3/4, HL-4GQV / HL-4GQVS / HL-4GQVS2, HL-4GXV / HL-4GXV-FSupported on Version: V3.2.42 or above
Tested with ONT HALNy: HL-1B, HL-2BV, HL-4G2Supported on Version: V4.0.7 or above
Tested with ONT HALNy: HL-4BX3V-F, HL-4GX3VRSupported on Version: V5.0.9 or above

How to run

  • configure IP-host interface for ONT and check IP-HOST-ADDRESS
  • send an HTTP request to API interface on port 48626
  • select proper endpoint to read/write/delete

http://IP-HOST-ADDRESS:48626/api/v2/endpoint

Username: apiuser
Password: <4lastMacCharacters>APIpass

Full REST API v2 documentation can be found here


Example of configuration using POSTMAN:

1. You can import our documentation straight to Postman, using Run in Postman button:

2. Next, define the api_user, api_pass and ont_ip variables, setting them as the Username, Password and ONT’s ip-host address:

3. After that, you can successfully send POST and GET requests using POSTMAN.


Example of configuration using cURL:

Variables:
Username: apiuser
Password: 8780APIpass
ONT ip-host address: 172.17.60.138
Endpoint: /wan/1

GET Request:

curl -u apiuser:8780APIpass http://172.17.60.138:48626/api/v2/wan/1

POST Request:

curl -u apiuser:8780APIpass http://172.17.60.138:48626/api/v2/wan/1 \
 -H "Content-Type: application/json" \
 --data '{
    "enabled":"yes",
    "conn_type":"DHCP",
    "mode":"router",
    "service_type":"internet",
    "ip_version":"ipv4",
    "dot1q":"tag",
    "vlan_id":"400",
    "cos":"0",
    "nat_enable":"yes",
}'

Triple play (Internet, IPTV, VoIP) ONT configuration

NOTE:
After each change, you must apply the settings using the dedicated apply node.

Router Mode – INTERNET

1. Configuration

URL:

http://{{ont_ip}}:48626/api/v2/wan/1

JSON:

{
"enabled":"yes",
"conn_type":"DHCP",
"mode":"router",
"service_type":"internet",
"ip_version":"ipv4",
"dot1q":"tag",
"vlan_id":"400",
"cos":"0",
"nat_enable":"yes"
}

2. Apply changes

URL:

http://{{ont_ip}}:48626/api/v2/wan/1/apply

JSON:

{
    "apply":"yes"
}

Bridge Mode – IPTV

1. Configuration

URL:

http://{{ont_ip}}:48626/api/v2/wan/2

JSON:

{
"enabled":"yes",
"conn_type":"bridge",
"mode":"bridge",
"service_type":"other",
"ip_version":"ipv4",
"dot1q":"tag",
"vlan_id":"200",
"cos":"5"
}

2. Apply changes

URL:

http://{{ont_ip}}:48626/api/v2/wan/2/apply

JSON:

{
    "apply":"yes"
}

Router Mode – VOICE

1. Configuration

URL:

http://{{ont_ip}}:48626/api/v2/wan/3

JSON:

{
"enabled":"yes",
"conn_type":"dhcp",
"mode":"router",
"service_type":"voip",
"ip_version":"ipv4",
"dot1q":"tag",
"vlan_id":"100",
"cos":"6"
}

2. Apply changes

URL:

http://{{ont_ip}}:48626/api/v2/wan/3/apply

JSON:

{
    "apply":"yes"
}

Port binding

NOTE:
LAN 2.5G port mapping depends on the device model:
HL-1B – LAN1
HL-2BV – LAN2
HL-4BX3V-F – LAN4

1. Configuration

Binding WAN1 to LAN1, LAN2, Wi-Fi2.4G, Wi-Fi5G:

URL:

http://{{ont_ip}}:48626/api/v2/wan/1/port_bind

JSON:

{
"lan1":"yes",
"lan2":"yes",
"lan3":"no",
"lan4":"no",
"wifi24_ssid1":"yes",
"wifi5_ssid1":"yes"
}

Binding WAN2 to LAN3, LAN4:

URL:

http://{{ont_ip}}:48626/api/v2/wan/2/port_bind

JSON:

{
"lan1":"no",
"lan2":"no",
"lan3":"yes",
"lan4":"yes",
"wifi24_ssid1":"no",
"wifi5_ssid1":"no"
}

2. Apply changes

URL:

http://{{ont_ip}}:48626/api/v2/wan/1/apply
http://{{ont_ip}}:48626/api/v2/wan/2/apply

JSON:

{
    "apply":"yes"
}

VoIP POTS configuration

1. Configuration

URL:

http://{{ont_ip}}:48626/api/v2/voip

JSON:

{
"register_server": "10.192.168.149",
"register_port":"5060"
}

URL:

http://{{ont_ip}}:48626/api/v2/voip/line/1

JSON:

{
    "enable": "yes",
    "login":"1100",
    "password":"1100",
    "display_name":"test_voip"
}

2. Apply changes

URL:

http://{{ont_ip}}:48626/api/v2/voip/apply

JSON:

{
    "apply":"yes"
}

LAN configuration change

1. Configuration

URL:

http://{{ont_ip}}:48626/api/v2/lan

JSON:

{
"dhcp_enable":"yes",
"ip": "192.168.99.1",
"netmask": "255.255.255.0",
"dhcp_lease_time":"7200",
"dhcp_start_ip":"192.168.99.100",
"dhcp_end_ip":"192.168.99.120",
"dns_proxy_type": "manual",
"dns_primary":"192.168.123.1"
}

2. Apply changes

URL:

http://{{ont_ip}}:48626/api/v2/lan/apply

JSON:

{
    "apply":"yes"
}

Wi-Fi 2.4 GHz Configuration

1. Configuration

URL:

http://{{ont_ip}}:48626/api/v2/wlan24

JSON:

{
    "enable": "yes",
    "mode": "802.11g/n/ax",
    "country": "POLAND",
    "channel": "13",
    "channel_selection": "manual",
    "channel_width": "40MHz",
    "tx_power": "100",
    "min_rssi_sta_connect": "-80",
    "min_rssi_sta_disconnect":"-85"
}

2. Apply changes

URL:

http://{{ont_ip}}:48626/api/v2/wlan24/apply

JSON:

{
    "apply":"yes"
}

Wi-Fi 2.4 GHz SSID 1 Configuration

1. Configuration

URL:

http://{{ont_ip}}:48626/api/v2/wlan24/ssid/1

JSON:

{
    "prefix":"TEST-",
    "ssid_name":"SSID-1",
    "security":"WPA2/WPA3 Personal",
    "encryption":"AES",
    "password":"wifipass"
}

2. Apply changes

URL:

http://{{ont_ip}}:48626/api/v2/wlan24/apply

JSON:

{
    "apply":"yes"
}

Wi-Fi 5 GHz Configuration

1. Configuration

URL:

http://{{ont_ip}}:48626/api/v2/wlan5

JSON:

{
    "enable": "yes",
    "mode": "802.11n/ac/ax",
    "country": "POLAND",
    "channel": "64",
    "channel_selection": "manual",
    "channel_width": "40MHz",
    "tx_power": "60",
    "dfs_enable":"yes",
    "min_rssi_sta_connect": "-80",
    "min_rssi_sta_disconnect":"-85"
}

2. Apply changes

URL:

http://{{ont_ip}}:48626/api/v2/wlan5/apply

JSON:

{
    "apply":"yes"
}

Wi-Fi 5 GHz SSID 1 Configuration

1. Configuration

URL:

http://{{ont_ip}}:48626/api/v2/wlan5/ssid/1

JSON:

{
    "prefix":"TEST5-",
    "ssid_name":"SSID-1",
    "security":"WPA2/WPA3 Personal",
    "encryption":"AES",
    "password":"wifipass5"
}

2. Apply changes

URL:

http://{{ont_ip}}:48626/api/v2/wlan5/apply

JSON:

{
    "apply":"yes"
}

Router Mode – INTERNET PPPoE

1. Configuration

URL:

http://{{ont_ip}}:48626/api/v2/wan/1

JSON:

{
"enabled":"yes",
"conn_type":"pppoe",
"mode":"router",
"service_type":"internet",
"ip_version":"ipv4",
"ppp_login":"login",
"ppp_password":"password123",
"dot1q":"tag",
"vlan_id":"400",
"cos":"0",
"nat_enable":"yes"
}

2. Apply changes

URL:

http://{{ont_ip}}:48626/api/v2/wan/1/apply

JSON:

{
    "apply":"yes"
}

WEB MGMT Configuration

1. Configuration

URL:

http://{{ont_ip}}:48626/api/v2/management/web

JSON:

{
"wan_mgmt_enable": "yes",
"wan_port": "8080",
"wan_https_port":"4443",
"iphost_port":"8081",
"iphost_https_port":"4444",
"lan_web_access_enable":"yes",
"https_access_enable":"yes"
}

2. Apply changes

URL:

http://{{ont_ip}}:48626/api/v2/management/web/apply

JSON:

{
    "apply":"yes"
}

Useradmin and Admin password change

1. Configuration

URL:

http://{{ont_ip}}:48626/api/v2/management/passwords

JSON:

{
"admin_password": "admin123",
"user_password": "adminnnnnn"
}

2. Apply changes

URL:

http://{{ont_ip}}:48626/api/v2/management/passwords/apply

JSON:

{
    "apply":"yes"
}

Port forwarding

1. Configuration

URL:

http://{{ont_ip}}:48626/api/v2/nat_config/port_forwarding_rule/0

JSON:

{
    "active":"yes",
    "protocol":"udp",
    "wan_start_port":"4000",
    "wan_end_port":"5000",
    "local_ip":"192.168.99.125",
    "lan_start_port":"1234",
    "name":"TEST",
    "nat_loopback_enabled":"no"
}

2. Apply changes

URL:

http://{{ont_ip}}:48626/api/v2/nat_config/port_forwarding_rule/apply

JSON:

{
    "apply":"yes"
}

Table of Contents
Comments are closed.