How to call rest API and subscribe for notification/event from custom widget

Hi @sudarshan.karande

there is not REST API over MQTT just the REST API which you might use in your widget.

I would urge you to read either the documentation or the following knowledge base articles:
https://cumulocity.com/guides/web/libraries/#client

http://resources.cumulocity.com/documentation/websdk/client/classes/alarmservice.html
http://resources.cumulocity.com/documentation/websdk/client/classes/eventservice.html

It is pretty simple to use the @c8y/client to read alarms (even on real-time) and visualize them in any widget / ui component.

2 Likes