I just want to call an event observer when the event is dispatched via the REST API. Like if an order is placed from a mobile application, only then the
sales_order_save_afterObserver should be called.
How do I write code for the same in
events.xml? Or do we have to write somewhere else?