Service Operations Insight

Tech Tip: Using REST UI to update alerts with ticketID 

Apr 08, 2015 10:27 AM

When using REST UI to update alerts with ticketID value you may get an "Invalid Identifier" error on the response. To succesfully update the alert with ticketID field you need to use the following method:

The PUT call requires you to provide all the attributes you get from GET call, for example, when you run

Get https://<SOIUI host>:7403/rest/alert/<Alert ID you would like to update>

you'll get the following result

 

<alertDefinition>

<acknowledged>false</acknowledged>

<ticketId/>

<assigned />

<exempt>false</exempt>

<userAttributes>

<userAttribute1 />

<userAttribute2 />

<userAttribute3 />

<userAttribute4 />

<userAttribute5 />

<userAttribute6 />

<userAttribute7 />

<userAttribute8 />

<userAttribute9 />

<userAttribute10 />

</userAttributes>

<ticketUrl />

</alertDefinition>

When executing the PUT call you'll have to copy the above result in to the body of the PUT call, edit the ticketID property to something similar to "<ticketId>RestUI</ticketId> ", the value "RestUI" needs to be changed to your actuall ticket number. You don't have to provide values to other attributes and they can remain as is.

NOTE: You'll have to change the content type to application/vnd.ca.soi.api.v2+xml as documented in "https://<SOIUI Hostname>:7403/rest/docs/rest/resource_AlertResource.html

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.