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.
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.
| ||
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. |
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
Code | Description | Comments |
---|---|---|
200 | OK | The request completed successfully. |
401 | Unauthorized | The user cannot be authenticated. Authentication has not been provided or has failed. A descriptive error message is returned in the response body. |
500 | Internal Server Error | An internal error occurred. A descriptive error message is returned in the response body. |
Response body
None
Give documentation feedback