When I try to add a Comment to an Incident, a 400 error is returned. I used test-json to verify the body of my API Post is valid.
Any thoughts? Here is what I have:
$Token = "our token"
$uri = "https://api.samanage.com/incidents/56982732/comments.json"
$headers_json = @{"X-Samanage-Authorization" = "Bearer $token"
"Accept" = "application/vnd.samanage.v2.1+json"
"Content-Type" = "application/json"}
$Body = @"
{
"comment":{
"body":"Test API",
"is_private":"false",
"commenter":"laredodave@domain.com",
}
}
"@
Invoke-RestMethod -Method Post -Headers $headers_json -Uri $uri -Body $Body