Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
Modify events
You can modify events (read, create, update and delete items) using a REST client within your web browser, or using the RestWsUtil
command-line utility.
Note With OMi 9.10 and higher, Event Web Service modify operations must be secured by setting the X-Secure-Modify-Token
HTTP header on modify requests (PUT, POST, and DELETE). This header provides enhanced security protection against malicious exploits of web applications. For more information, see Secure modify operations.
Modifying events using a REST client
In general, when using a REST client to update an event, it is usual to do the following:
-
Call the REST service by entering the URL of the event in question (you need to specify the event ID in the URL).
-
Retrieve the event with an HTTP GET request.
-
Edit the elements of the XML document you want to change.
-
Send back the changed parts of the event using an HTTP PUT request.
-
Reload the XML to see the changes.
Two examples of REST clients that can be used to modify events are the REST Client and the Mozilla Firefox Poster Extension.
Here, we will look at how to use the REST Client to modify events. The REST Client is available as an open source download. You can find information about where to download the REST Client from this location:
http://code.google.com/p/rest-client/
The REST Client user interface is divided into two parts:
-
HTTP Request: top half of the user interface, used for entering the URL for the event you want to modify, to retrieve the event with an HTTP GET request, and for sending the changed XML using an HTTP PUT request.
-
HTTP Response: bottom half of the user interface, used for returning the response.
We will use an example of how to change the title and severity of an event using the REST Client. The steps required are as follows:
-
Get the event ID of the event you want to modify from the event list feed.
-
In the URL field of the REST Client user interface, enter the URL (specifying the event ID) of the event you want to modify. The syntax is as follows:
https://<server.example.com>/opr-web/rest/9.10/event_list/<event_ID>
-
Select the GET radio button in the HTTP Method box, and click the button.
-
The result is returned in the lower, HTTP Response section. Click the Body tab to read the response XML for the event you want to edit.
-
Copy the XML. Click the Body tab in the upper, HTTP Request section, and paste the XML into the text box.
-
Edit the event properties you want to change to modify the event. It is not necessary to send the complete XML back to the server. As long as you preserve the XML structure, you can choose to send only those XML elements that you want to update for that event.
-
When you are done with your changes, select the Method tab again, and then click the PUT radio button.
-
Click the button to submit the changes. When the changes have been applied, you will see an HTTP
200 OK
message in the Response area. Check the Atom feed to verify the changes you made.
To illustrate how you can modify events using a REST client, Here we will look at how to use the Mozilla Firefox Poster Extension to modify events. The Poster Extension is a simple REST client that you first need to install as a plug-in for Firefox.
We will use an example of how to change the title and severity of an event using the Firefox Poster Extension. The steps required are as follows:
-
First install the Mozilla Firefox Poster Extension if it is not already installed.
-
Open a Firefox browser, and select Tools > Poster. This opens a Poster dialog box.
-
Get the event ID of the event you want to modify from the event list feed.
-
In the URL field of the Poster dialog box, enter the URL including the event ID of the event you want to modify. The syntax is as follows:
https://<server.example.com>/opr-web/rest/9.10/event_list/<event_ID>
-
Click GET to receive the event as XML. A window entitled Response opens, and if there are no errors, the status should be stated as
200 OK
and you should be able to see the full XML of the event you want to modify. -
Copy the full XML from the Response window and paste it into content text field of the Content to Send tab in the Poster dialog box. You no longer need the Response window, so you can close it now.
-
Next, you can edit the XML according to the changes you want to make to the event. It is not necessary to send the complete XML back to the server. As long as you preserve the XML structure, you can choose to send only those XML elements that you want to update for that event.
Note Not all properties can be updated. For a list of editable properties, see Editable properties. Also check the latest Java API documentation, which is contained in a zip file that you can find in the following location:
<OMi_HOME>/opr/api/doc/opr-external-api-javadoc.zip
Unzip the contents of the zip file to a suitable location to see the API documentation.In this example, we will change the title of the event, and also the event severity, directly in the XML. For example, the event’s original title was: “
'Employee Self Service' web application is slow
” and we want to edit the event title by inserting the word “very”:...<title>'Employee Self Service' web application is very slow</title>...
Similarly, we could change the event severity from minor to warning:
...<severity>warning</severity>...
-
Once you have made your changes to the event, make sure that the Content Type field is set to application/xml (you must type this in). Then click PUT to save your changes. A Response window opens, and if there are no errors, you see an HTTP
200 OK
message. Check the Atom feed to verify the changes you made.
You can find more information about Firefox Poster Extension at the following location:
Modifying events using the RestWsUtil utility
A REST web service utility is provided to allow you to execute REST web service operations against the event web service from the command-line. With this utility, you can execute one of the four following REST web service operations:
CRUD Operation |
HTTP Method |
---|---|
Create |
POST |
Read |
GET |
Update |
PUT |
Delete |
DELETE |
You can find the utility in the following location:
<OMi_HOME>/opr/bin
You can modify events using the RestWsUtil
command-line utility.
Example: How to Change an Event Title
To change the title of an event using the RestWsUtil
utility, follow these steps:
-
Get the event ID of the event you want to modify.
-
Write the XML for the event you want to modify to an XML file (called, for example, update.xml) in the <OMi_HOME>/opr/bin directory.
The contents of the
update.xml
file look like this:<event xmlns="http://www.hp.com/2009/software/opr/data_model"><title>
New title goes here
</title></event>
Edit the title.
-
To update and save the change, enter the following command in a command prompt:
<OMi_HOME>/opr/bin>RestWsUtil -update update.xml -username <login name> -password <password> -url "https://<server.example.com>/opr-web/rest/9.10/event_list/<event_ID>"
Where:
<OMi_HOME>
is the directory where OMi is installed,<login name>
is the user name required for authentication, and<event_ID>
is the ID of the event you want to modify.
For further details and examples of how to use the RestWsUtil
command-line utility, see RestWsUtil Command-Line Interface.
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to ovdoc-asm@hpe.com.
Help Topic ID:
Product:
Topic Title:
Feedback: