Powershell\s invoke-restmethod did not work as intended. Some REST calls worked, but some didn't. It took me quite some time to figure out what was going on...