Hi Everyone.
I’m trying to execute a worklet through the APPI but Im only getting a bad request error.
Any idea what could be wrong ?
$polid = MyPolicyWorkletID
$headers = @{ "Authorization" = "Bearer $apiKey" }
$url = "https://console.automox.com/api/policies/$polid/action?o=MyOrgID"
$body = @"
{
"action": "remediateServer"
"serverId": "MyServerID"
}
"@
Invoke-WebRequest -Method POST -Uri $url -Headers $headers -Body $body
Thanks for any help !!
Diego