Any way to modify Group Networks entries via API?

I use a Grouped Network to enter the Zoom IP ranges from this page:


,as a single Grouped network which I route over a specific WAN.
There are a couple of issues:
  1. Zoom are constantly updating the IP ranges (both adding AND removing entries)
  2. Updates to the grouped network are NOT ordered by IP range numbers, so it’s difficult to compare what’s changed without exporting to something like Excel and sorting.

It would be fantastic if there was an API to add/remove entries in Group Networks, but I’m not aware of any?

Sure.
GET to https:///cgi-bin/MANGA/api.cgi?func=config.namedNetwork returns the current named networks eg:

{
  "stat": "ok",
  "response": {
	"1": {
	  "name": "Test",
	  "network": [
		{
		  "ip": "1.1.1.1",
		  "mask": 32
		},
                    {
		  "ip": "2.2.2.2",
		  "mask": 32
		},
		{
		  "ip": "3.3.3.3",
		  "mask": 32
		}
	  ]
	},
	"order": [
	  1
	]
  }
}

Then A POST to https:///cgi-bin/MANGA/api.cgi can update it

{
   "func":"config.namedNetwork",
   "action":"update",
   "id":1,
   "name":"Test",
   "network":[
	  {
		 "ip":"1.1.1.1",
		 "mask":"32"
	  },
	  {
		 "ip":"3.3.3.3",
		 "mask":"32"
	  }
   ]
}
3 Likes

Thanks Martin! Is there any formal documentation for the API calls above, or did you just extract them from looking at the network calls in the browser?

No. Nearest thing is https://download.peplink.com/resources/Peplink-Router-API-Documentation-for-Firmware-8.1.0.pdf which has a subset of functions.

Yes I did.

1 Like