[SOLVED] API v3 JSON and Powershell

[SOLVED] API v3 JSON and Powershell

Does anyone know how to give JSON input to the v3 API and have it work? I've been bashing my head against the wall all day.

$inputData = @"
{
"operation": {
"details": {
"resolution": {
"resolutiontext": "Test text here."
}
}
}
}
"@

$inputData =  $inputData | ConvertTo-Json -Depth 50

$postparams = @{OPERATION_NAME='ADD_RESOLUTION';TECHNICIAN_KEY=$apikey;INPUT_DATA=$inputData;FORMAT='JSON'}
Invoke-RestMethod -Uri "$URI/api/v3/requests/498420/resolutions" -Method POST -Body $postparams -ContentType "'application/json"

                  New to ADSelfService Plus?