POST /events/actions

Use the POST method to post an event action entry to the registry for filtering on incoming events.

Authentication

Authentication with user name and password is required.

Request URL

POST https://<management_server_IP>/events/actions

Query parameters

None

Request body

A JSON object that contains the event action or function URL and event filter.

Attributes Required / Optional Type Description
eventFilter Required Object Information about the event filter. At least one of the following JSON objects must be specified.
  fields Optional Array of objects Fields to filter on and the associated REGEX string to filter. The event field must match one of the supported fields in the event class (see Filtering events).
    field Required if fields is specified String Fields to filter on

This field must match one of the supported fields in the event class. For more information about filtering events, see Filtering events.

    value Required if fields is specified String Associated REGEX string to filter
  filtertype Optional String Type of filter. This can be one of the following values.
  • FIELDREGEXAND. Event filter matches only if all fields find a match with the given field REGEX.
  • FIELDREGEXOR. Event filter matches if any field finds a match with the given field REGEX.
  • FIELDREGEXNOT. Event filter matches only if all fields do not find a match with the given field REGEX.
name Required String Name used to identify the event action
Note: This name must be unique.
persistent Optional String Indicates whether this event action entry should be saved across restarts of the XClarity Administrator
port Optional Integer Port to use for this event action

The default port is 8080.

uri Required String Action or function to call when an incoming event is found to match the filter. The action must be a REST API supporting a POST call to the URI with the JSON object form of the event in the body.

Request example

{
    "eventFilter": { 
        "fields":[{
            "field":"eventID", 
            "value":"FQXHMDM0001I|FQXHMDI0002I|FQXHMDI0001I|FQXHMSS1001I"
        }],
        "filterType":"FIELDREGEXOR"
    },
    "persistent":"false",
    "name":"flexcat-event-handler",
   "port": "8080",
    "uri" : "/osdeployment/rest/internal/event"
}

Response codes

Code Description
200 OK
401 Unauthorized
500 Internal server error

Response body

None