This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

REST API - changing state?

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