today i reached a partial success.
Namely that i could restart the Switch with Scripting.
An advice i could get from this article: https://community.extremenetworks.com/extreme/topics/cant-import-api-from-exos
It is prefered to write the script language in JSONRPC. So i did and it worked.
Nonetheless the log of the mail described a failure which was not correct.
Therefore partial success. I have to look further.
I hope that this will help you to reach your Goal.