Advanced modification of event properties

An event has a selected number of list properties that can be modified by the OPR Event services listed in the Service Document, described in the section Access the Event Web Service.

To generate an XML list of the custom attribute properties of the specified event, you call the following URL:

https://<server.example.com>/opr-web/rest/9.10/event_list/<event_ID>/custom-attribute-list/

Where:

<server.example.com> is the name of the gateway server, and <event_ID> is the ID of the event for which you want to list the custom attributes.

The REST response to such a URL call (in this case for an event with the ID 26629e00-2d8d-71dd-1aa2-1039228c0111) could look like this:

<custom_attribute_list 
      xmlns="http://www.hp.com/2009/software/opr/data_model"
      self="http://<server.example.com>/ws/rest/event_list/26629e00-2d8d-71dd-1aa2-1039228c0111/custom_attribute_list"
      type="urn:x-hp:2009:software:data_model:opr:type:event:custom_attribute_list"
      version="1.0">
  <custom_attribute 
      self="http://<server.example.com>/ws/rest/event_list/26629e00-2d8d-71dd-1aa2-1039228c0111/custom_attribute_list/drilldown.url.ci"
      type="urn:x-hp:2009:software:data_model:opr:type:event:custom_attribute"
      version="1.0">
    <name>drilldown.url.ci</name>
    <value>http://url.to/drill/down/ci</value>
  </custom_attribute>
  <custom_attribute
      self="http://<server.example.com>/ws/rest/event_list/26629e00-2d8d-71dd-1aa2-1039228c0111/custom-attribute-list/drilldown.url.event"
      type="urn:x-hp:2009:software:data_model:opr:type:event:custom_attribute"
      version="1.0">
    <name>drilldown.url.event</name>
    <value>http://url.to/drill/down/event</value>
  </custom_attribute>
</custom_attribute_list>

Using the Event Web Service, you can create and edit list items, and also delete items from the custom attributes list.

Note You cannot create or delete an event itself using the RestWsUtil command-line utility.

To create a custom attribute item for a specified event, you send an HTTP POST request with the corresponding XML object to the event custom attribute list URL. When you call the custom attribute list URL for your specified event, you see that your new item has been added to the list of custom attributes for that event.

To edit an item in the list of custom attributes, you do something very similar. You send an HTTP PUT Request specifying an existing item name and a changed value for that item. The Event Web Service updates the value to the new value.

The HTTP response could look like this:

<custom_attribute 
     xmlns="http://www.hpe.com/2009/software/opr/data_model"
     self="http://<server.example.com>/ws/rest/event_list/26629e00-2d8d-71dd-1aa2-1039228c0111/custom_attribute_list/mynewattribute"
     type="urn:x-hp:2009:software:data_model:opr:type:event:custom_attribute"
     version="1.0">
  <name>mynewattribute</name>
  <value>Hello</value>
</custom_attribute>

Similarly, to delete an item from the list of custom attributes, you send an HTTP DELETE request to the following URL:

https://<server.example.com>/opr-web/rest/9.10/event_list/<event_ID>/custom_attribute_list/<custom_attribute_name>

Where:

<custom_attribute_name> is the name of the custom attribute selected for deletion.