Issue Creating a Problem via API

Hi!

I am trying to create a Problem via API:

$freshProblemBody = @{
subject = “SD_ID: $($problemNoNote.id) | $($problemNoNote.title)”
description = $problemNoNote.short_description
priority = if ($problemNoNote.priority.id -eq 601) { 4 } elseif ($problemNoNote.priority.id -eq 602) { 3 } elseif ($problemNoNote.priority.id -eq 603) { 2 } elseif (($problemNoNote.priority.id -eq 1) -or ($problemNoNote.priority.id -eq 605)) { 1 } else { $null }
impact = if ($problemNoNote.impact.id -eq 1) { 3 } elseif ($problemNoNote.impact.id -eq 3) { 1 } elseif ($problemNoNote.impact.id -eq 2) { 2 } else { $null }
status = if ($problemNoNote.status.name -eq “Closed”) { 3 } elseif ($problemNoNote.status.name -eq “ZZ_eCW Jira Opened”) { 4 } else { 1 }
category = $mappedCategory
requester_id = $problemRequester
agent_id = $problemAgent
group_id = $problemGroupID
workspace_id = 2

    analysis_fields = @{
        problem_cause = @{ description = if ($problemNoNote.root_cause.description) { "$($problemNoNote.root_cause.description)" } else { "" } }
        problem_symptom = @{ description = if ($problemNoNote.symptoms.description) { "$($problemNoNote.symptoms.description)" } else { "" } }
        problem_impact = @{ description = if ($problemNoNote.impact_details.description) { "$($problemNoNote.impact_details.description)" } else { "" } }
    }
} | ConvertTo-Json -Depth 10

# Create the problem
$CreateProblem = Invoke-RestMethod -Uri $freshProblemUrl -Method Post -Headers $advFDheaders -Body $freshProblemBody

But recieving the error below:

Invoke-RestMethod:
{
“description”: “Validation failed”,
“errors”: [
{
“field”: “closure_rules”,
“message”: “Analysis section (includes Root Cause, Impact and Symptom) should be filledWorkaround / Solution should be added”,
“code”: “invalid_value”
}
]
}

I can’t seem to figure out what it calls “solution” or “workaround”. ive tried both of those and still recieve the same error.

Has anyone been able to successfully create a closed problem?