How to I get alarms on custom widget

Product/components used and version/fix level are you on:

Backend: 1015.0.278
UI: 1011.0.38

Detailed explanation of the problem:

I have created a simple custom widget and install it on Cumulocity and I am able to use that widget , I am using application builder , I have followed these links till now

SoftwareAG/cumulocity-react-runtime-widget: This is demo Widget created using Angular Library and later deployed in App Builder as Cumulocity IoT widget. It fetches Inventory data based on the device id and displays the same in a widget. (github.com)

Cumulocity Application Builder - Build and Deploy Custom widget - Knowledge base - Software AG Tech Community & Forums

my question is how i will able to get alarm on this widget either I have to integrate API and deploy it , will it work ? will I able to see when ever alarm come on that API?

or there is any other way by which I can show alarms on that widget

Error messages / full error message screenshot / log fileL

Is your question related to the free trial, or to a production (customer) instance?

Have you installed all the latest fixes for the products and systems you are using?

Hi Sumit,

Yes, you need to call APIs to get Alarm on this widget.
You can refer GitHub - Cumulocity-IoT/cumulocity-sample-react-library: A sample react library which fetches and displays the device details based on the device id. where you will find example of inventory API implementation.
I am not sure at this moment about Realtime data using this react project. This was not tested in this example.

You can refer Cumulocity IoT - OpenAPI Specification for API Specification.

Thank You @Darpankumar_Lalani ,
means Just i have to call rest api in my widget project and show those data in widget but is it really change if api sending some value , is it reflected that time?

Hi @Darpankumar_Lalani @Christian_Guether1 @Stefan_Witschel
my requirement is I have a custom widget for showing these


alarms in my custom widget which i have developed using application builder so now i have simple custom widget in angular on cumulocity

and its code in my ide

look like this
now what i want , i want to execute shell command from my custom widget code i and then want to call my alarms api so that i can show my ui alarms in the widget so once shell command executed we will alarm rest api call and we will show values in custom widget, widget using angular , what kind of process and steps i have to follow little docs and info can help a lot .
Just I need some step guide or suggestion so that i can achieve my requirement easily so if possible provide me some docs or guide something.

I want

  1. execute shell command from custom widget code
  2. after Shell command execution is done in custom widget code , I want to call my alarm rest API and use these values in custom widget.

is there any approach for achieve this ?

thanks and regards
sumit singh

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.