History: We recently changed the way our email shows up to the SolarWinds email inbox for Service Desk, it went from our general state.us domain to agency.state.us. This caused new tickets to create new users, separate from the ones we sync to SAManage. We fixed this by updating the synced users to have the new domain as their email address.
We cleaned up any resolved tickets, but old tickets that have already gone to the 'closed' state that can't be re-associated with the correct user account without re-opening the tickets. While I could disable notifications and go through and set them one-by-one, this is arduous and messes up the resolved date and tech. What I'd like to do is update it via the API.
I've gotten it to work to retrieve incidents and create new ones, but I can't seem to update the requester for existing incidents, closed or open. I'm using the below command:
curl.exe -H "X-Samanage-Authorization: Bearer $token" -d 'c:\test\SW\email.xml' -H 'Accept: application/xml' -H 'Content-Type:text/xml' -X PUT https://api.samanage.com/incidents/123456.xml
<?xml version="1.0" encoding="UTF-8"?>
The XML file I'm using is formed like this, but of course with an existing requester account. I've tried with just email, just account_id, and several other variations:
I went into this hoping I could just do a search for any ticket that had @state.us as a requester and update it to @agency.state.us, but it doesn't look like it's that simple. Most of the samples I'm seeing are for the on-prem Help Desk or other tools. Any tips would be appreciated!