Use Web API to switch POE ports on TSW202

Hi,

a collegue purchased a TSW202 because we use POE devices that must be switched off/on during an initialization phase of our program.
He thought the device would support SNMP, but that’s readonly.

Anyway, I used the Web API to mimic a browser to switch those ports on/off. I noticed that things that worked with the shipped firmware 1.01 don’t in 1.05.

In the API endpoint “/api/ports_settings/config” there has been a property “enable” in 1.01 that seemed to get renamed to “enabled” in newer versions.
1.01:
{“data”:
[
{
“enable”:“1”,“_isolated”:“0”,“eee_enable”:“1”,
“duplex”:“full”,“speed”:“auto”,“poe_enable”:“0”,“id”:“port1”
}
]
}
Because we don’t need to dis/enable ports I just left out this field. But as a wish for future changes: Don’t change it for cosmetic reasons (unless you probably make fields more consistent across different products).