01-27-2013 07:04 AM
If an error occurs in an Operations Orchestration flow I would like to create an OMi event within the flow via the OMi API (in exactly the same way as SiteScope can send an event on error).
I can't work out how to create this event. This is from the Operations Manager i Extensibility Guide:
How to Create New Events: You can create new events using the RestWsUtil command-line utility
But can this be done simply via the REST client without RestWsUtil? And is this the creation of a new event or a new event type?
Solved! Go to Solution.
01-27-2013 10:20 AM
OMi Web Service allows to create actual events, not event types.
RestWsUtil is simply a wrapper utility and significantly simplifies using this REST API. If you prefer more complex approaches nothing prevents you from doing so. API is just API regardless of the way you use it.
Event Web Service Java API Documentation can be found at HPBSM/opr/api/doc/opr-external-api-javadoc.zip
01-28-2013 05:35 AM
Thanks. I have successfully created an event with using RestWsUtil i.e. RestWsUtil -create c:\my.xml etc, where my.xml is the same as the example in the doc:
<title>My very own event</title>
This worked. But I then tried to do the same thing using a REST client in Firefox. It is this which I cannot find in the documentation. Here is the URL I used:
I gave it the same authorization as in the RestWsUtil, added the content-type and in the body entered the same xml as above.
Is this the correct form of the URL and body?
(I get a 403 access is denied error. I do have permissions though and they are the same as in the RestWsUtil call).
01-28-2013 09:30 AM
Do you set X-Secure-Modify-Token HTTP header?
If not, did you disable
Infrastructure Settings > Applications = Operations Management
Operations Management - Web Service Settings > Secure Modify?
05-07-2014 07:41 PM
Thanks for that, however if you want to keep the web service security enabled, how do I know what to set X-Secure-Modify to? The BSM/OMi Extensibility document appears to give no hints on what it should be.
05-07-2014 08:31 PM
Please check the Extensibility guide again, it's more than clear on that subject. Here is a quote:
Web Service clients must first obtain the secureModifyToken cookie, and then set the value of the cookie in the
X-Secure-Modify-Token HTTP header.