Hi,
I'd like to schedule nightly restarts of my tmobile 5g gateway. i've identified the rest API commands needed. I can port them over from powershell but am looking for a Restapi interface that can handle a sequence of commands. Any suggestions on how to build this? should I create an app or a device or is there a way to use Maker API?
Thank you in advance!
-
$body = @"
-
{
-
"username": "admin",
-
"password": "natertaterchannel.com"
-
}
-
"@
- $reponse = Invoke-RestMethod -Method POST -Uri "http://192.168.12.1/TMI/v1/auth/login" -Body $body
- $token = $reponse.auth.token
- $header = @{Authorization="Bearer $token"}
-
$response = Invoke-RestMethod -Method POST -Uri "http://192.168.12.1/TMI/v1/gateway/reset?set=reboot" -headers $header
-
$response