How to get or set the configuration
Retrieving or modifying the SecureEdge configuration requires authentication, see How to authenticate to the API.
Introduction
You can use the various configuration endpoints to obtain or modify the configuration of the SecureEdge, for example to automatically provision the desired connection settings.
WAN network
Use the /api/v1/network/wan
endpoint to configure the WAN network:
curl --request POST \
--url 'http://192.168.140.1:80/api/v1/network/wan' \
--cookie 'session.jar' \
--header 'Content-Type: application/json' \
--data '
{
"dhcp_active": false,
"ip": "172.27.1.111",
"netmask": "255.254.0.0",
"gateway": "172.27.0.1",
"dns_servers": [
"1.1.1.1"
]
}'
In REST fashion, we can then GET
the same endpoint to retrieve the current WAN network configuration:
curl --request GET \
--url 'http://192.168.140.1:80/api/v1/network/wan' \
--cookie 'session.jar'
{
"dhcp_active": false,
"ip": "172.27.1.111",
"netmask": "255.254.0.0",
"gateway": "172.27.0.1",
"dns_servers": [
"1.1.1.1"
]
}
LAN network
Use the /api/v1/network/lan
endpoint to configure the LAN network:
curl --request POST \
--url 'http://192.168.140.1:80/api/v1/network/lan' \
--cookie 'session.jar' \
--header 'Content-Type: application/json' \
--data '
{
"ip": "192.168.140.1",
"netmask": "255.255.255.0",
"dhcp_range": {
"start": "192.168.140.100",
"end": "192.168.140.249"
}
}'
Similarly, obtain the LAN network configuration:
curl --request GET \
--url 'http://192.168.140.1:80/api/v1/network/wan' \
--cookie 'session.jar'
{
"dhcp_active": false,
"ip": "172.27.1.111",
"netmask": "255.254.0.0",
"gateway": "172.27.0.1",
"dns_servers": [
"1.1.1.1"
]
}
Do not forget to start making subsequent requests to the new IP address if you change the LAN IP address of the SecureEdge.
Updated about 1 month ago