Can someone provide an example of invoking “qoperation execute” via a POST QCOMMAND call to the REST API? I’m trying to build the XML for the “qoperation execute” as a PowerShell variable (in a loop, updating backed on what we’re looping on), but since I’ve never done anything like this, I can’t tell why I’m getting an “internal error” response, apart from, “clearly I don’t know what I’m doing.” If I can see a successful example, I can see how different my attempt looks and hopefully adjust accordingly.
Thanks,
Nick
Since someone is likely to ask:
$napTime = "<?xml version=`"1.0`" encoding=`"UTF-8`"?><App_SetMediaAgentPropertiesReq> <mediaAgentInfo><mediaAgent mediaAgentName=`"$thisma`"/> <mediaAgentProps markMAOfflineForMaintenance=`"1`" enableMAAfterDelay=`"60`"/></mediaAgentInfo></App_SetMediaAgentPropertiesReq>"
$takeNap = "$origin/Qcommand/qoperation%20execute -req $naptime"
$a5 = Invoke-RestMethod -Uri $takeNap -Method Post -Headers $headers
Best answer by christopherlecky
View original