Skip to main content

POST /events/actions

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

Authentication

Authentication with username 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.

AttributesRequired / OptionalTypeDescription
eventFilterRequiredObjectInformation about the event filter. At least one of the following JSON objects must be specified.
 fieldsOptionalArray of objectsFields 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).
  fieldRequired if fields is specifiedStringFields 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.

  valueRequired if fields is specifiedStringAssociated REGEX string to filter
 filtertypeOptionalStringType 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.
nameRequiredStringName used to identify the event action
Note
This name must be unique.
persistentOptionalStringIndicates whether this event action entry should be saved across restarts of the XClarity Administrator
portOptionalIntegerPort to use for this event action

The default port is 8080.

uriRequiredStringAction 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.
The following example posts an event action.
{
"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

CodeDescriptionComments
200OKThe request completed successfully.
401UnauthorizedThe user cannot be authenticated. Authentication has not been provided or has failed. A descriptive error message is returned in the response body.
500Internal Server ErrorAn internal error occurred. A descriptive error message is returned in the response body.

Response body

None