Skip to content

System generated emit event api

  • Emit any event

Request Method: POST

URL

/api/system-api/user-path/emit-event

Request payload

  • Emit single event multiple listeners.
{
    "name": "Event_name",
    "eventData": {
        "some": "data"
    },
    "executeListeners": ["listener"]
}
  • Emit multiple events in single API call.
[
    {
        "name": "Event_name",
        "eventData": {
            "some": "data"
        },
        "executeListeners": ["listener"]
    },
    {
        "name": "Event_name",
        "executeListeners": ["listener1","listener2"]
    }
]

Emit event System API

Emit event using global object 'g'.

await g.sys.system.emitEvent("EVENT_NAME", "EVENT_DATA", ["LISTENERS_NAME"]);