Using the API to generate a password

Using the API to generate a password

I'm trying to generate a password using the API from PowerShell. However, the following code isn't working for me:
  1. $pmpServer = "pmpro.mydomain.com:7272"
  2. $baseUri = "https://$($pmpServer)/restapi/json/v1/passwords/generate"
  3. $header = @{'AUTHTOKEN'='<tokenCode>'}
  4. $inputData = @{INPUT_DATA='{ "operation" : { "Details" : { "POLICY" : "Strong"}}}'}
  5. Invoke-RestMethod -uri $baseUri -Body $inputData -Headers $header -Method Post
When I run the above, I get "404 - File not found error". What am I doing wrong? I don't know the exact PMPro version we're on, but it's pretty recent.

Thanks,
Eric