Pulling WAN status (online, offline) from API

Hello. After looking through the documentation, I’m unable to find a way to pull a device’s WAN status (whether the specific WAN ID is online or offline).

There’s a way to see it in InControl but I’m wanting to do some reporting via the API and this data is pertinent.

(screenshot of InControl: Screenshot by Lightshot)

Thank you very much for your time.

Please refer to the InControl2 API document. You should able to get the WAN status if you keep poll /rest/o/{organization_id}/g/{group_id}/d/{device_id} for about 5 seconds.

1 Like

Hey TK. Here’s the data I get from that call: Screenshot by Lightshot

Here’s the URL I put in https://api.ic.peplink.com/rest/o/HhbJ2K/g/28/d/95/wan_history?access_token=******&wan_id=0&start_num=1&limit=100

I’m not sure what start_num is supposed to be

Hi,

The start_num and limit is no. of record to retrieve, say if start_num = 10 & limit = 10, we would retrieve record 10 to 19, order by down time in descending order.

Shall you have any further question related to InControl2 API, please send email to “[email protected]”, we would response quicker and directly thru email, thanks.

Billy
The Peplink Team

1 Like