I'm working with the REST API to create incidents. Is there any way to specify an incident's state as "Closed"? For some scripted events, I'd like to create the incident and close it to keep it off the "Active Incidents" queue. I'm using code similar to this:
$TestBody = @"
{
"incident": {
"name": "Incident Name",
"priority": "Normal",
"site": { "name" : "SiteName" },
"department": { "name" : "Department" },
"category": { "name" : "Category" },
"subcategory": { "name" : "Subcategory" },
"description": "Successfully automated task.",
"requester": { "email" : "requestor@domain.com }
}
}
"@
Invoke-RestMethod -Method Post -Headers $Headers -Uri $URI -Body $TestBody