Event

Generate events

This API can be called to generate events when an abnormal situation occurs.

*Method: POST

  • URL:/rest/monitor/api/event/create/

  • Post body: as follows

{
  "security": "<security code>",
  "title": "<Event title>",
  "content": "<event content>",
  "severity": "<Severity level, fill in 1-5>",
  "omflow_restapi": 1,
  "source2": "<source>"
}

The above Post body is the basis for converting the content into an event. The severity level is divided into five levels, namely 1 (Info), 2 (Normal), 3 (Warning), 4 (Major), and 5 (Critical). For example, If the severity level is Warning, fill in 3 for the severity parameter. In addition, source2 is an index string that concatenates the same events of the same device, which will be further explained in the next chapter.

All APIs must obtain a security code (security) before using it. For how to obtain it, please refer to the chapter [RESTAPI > Security Code].

Close event

When the abnormal situation is eliminated, you can call this API to close the event. The system will close all events that match the specified source2 string.

*Method: POST

  • URL:/rest/monitor/api/event/close/

  • Post body: as follows

{
  "security": "<security code>",
  "omflow_restapi": 1,
  "source2": "<source>"
}

All APIs must obtain a security code (security) before using it. For how to obtain it, please refer to the chapter [RESTAPI > Security Code].

instructions

In addition to this website explaining how to use the event API, there are also instructions on the system. You can go to the "Event API" tab of the main menu > Data Collection > Event Management to view it.

Last updated