An example of doing the same thing in PowerShell using Invoke-WebRequest:
$response = Invoke-WebRequest -uri https://[SERVER_ADDRESS]/api/v1/auth/authenticate-user -ContentType "application/json" -Method post -Body ($api|ConvertTo-JSON)
In this, $api is a hash containing two elements: username and password. You can also use json file data directly using Get-Content in the -Body argument.
If successful, $response will be a hash of the session data. You can then extract what you need:
$content = $response.Content | ConvertFrom-JSON
In the exercise of authenticating, $content.accessToken will contain the authentication token we need.
This part is mostly academic for me, as my primary purposes put me in a non-PowerShell environment. Nonetheless, this could prove useful later.