# API Endpoint to query/poll live event data of device/all device

**URL:** <https://community.cumulocity.com/t/api-endpoint-to-query-poll-live-event-data-of-device-all-device/904>\
**Category:** Forum\
**Tags:** device-connectivity, cumulocity\
**Created:** [October 21, 2022, 8:26am UTC](https://community.cumulocity.com/t/api-endpoint-to-query-poll-live-event-data-of-device-all-device/904 "2022-10-21T08:26:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harshil\_Gandhi](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/harshil_gandhi/32/6222_2.png) [@Harshil\_Gandhi](https://community.cumulocity.com/u/Harshil_Gandhi)\
**Post date:** [October 21, 2022, 8:26am UTC](https://community.cumulocity.com/t/api-endpoint-to-query-poll-live-event-data-of-device-all-device/904/1 "2022-10-21T08:26:08Z")

</div>

#### What product/components do you use and which version/fix level are you on?

latest

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

yes

#### What are you trying to achieve? Please describe it in detail.

I want to display real time event with Backend integration to rest based grid widget where i can get all fields that my device is sending to managed object.

i would like to know which exact endpoint to use along with the query expression

#### Do you get any error messages? Please provide a **full error** message screenshot and log file.

No

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

Yes

---

<div class="post-metadata">

**Author:** ![Meer\_Arfath](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@Meer\_Arfath](https://community.cumulocity.com/u/Meer_Arfath)\
**Post date:** [October 21, 2022, 9:28am UTC](https://community.cumulocity.com/t/api-endpoint-to-query-poll-live-event-data-of-device-all-device/904/2 "2022-10-21T09:28:18Z")

</div>

Hello,

REST based grid widget supports any External REST APIs. If you are looking for realtime events then you can try “Event List” widget or customize the widget based on your needs. For more info [cumulocity-rest-based-grid-widget/README.md at main · Cumulocity-IoT/cumulocity-rest-based-grid-widget · GitHub](https://github.com/Cumulocity-IoT/cumulocity-rest-based-grid-widget/blob/main/README.md)

---

<div class="post-metadata">

**Author:** ![Harshil\_Gandhi](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/harshil_gandhi/32/6222_2.png) [@Harshil\_Gandhi](https://community.cumulocity.com/u/Harshil_Gandhi)\
**Post date:** [October 21, 2022, 9:42am UTC](https://community.cumulocity.com/t/api-endpoint-to-query-poll-live-event-data-of-device-all-device/904/3 "2022-10-21T09:42:04Z")

</div>

yes i know that but event list is not fully capable of functionalities such as filters and search

so in this case which component should i use if rest base grid does not allow me to use Rest API

do you have tutorial to buid streaming endpoint quickly with deployment

---

<div class="post-metadata">

**Author:** ![Harshil\_Gandhi](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/harshil_gandhi/32/6222_2.png) [@Harshil\_Gandhi](https://community.cumulocity.com/u/Harshil_Gandhi)\
**Post date:** [October 21, 2022, 10:16am UTC](https://community.cumulocity.com/t/api-endpoint-to-query-poll-live-event-data-of-device-all-device/904/4 "2022-10-21T10:16:37Z")

</div>

My requirement is to rapidly have functionality for searching and filtering records with real time streaming events.  
Rest based widget is one of the way to achieve it but sadly as responded ,I am not able to hookup existing Cumulocity endpoint to it for quickly binding the data

---

<div class="post-metadata">

**Author:** ![Meer\_Arfath](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@Meer\_Arfath](https://community.cumulocity.com/u/Meer_Arfath)\
**Post date:** [October 21, 2022, 11:21am UTC](https://community.cumulocity.com/t/api-endpoint-to-query-poll-live-event-data-of-device-all-device/904/5 "2022-10-21T11:21:35Z")

</div>

Can you please share the screenshot of the configuration page of Rest based grid widget to get an idea of the configurations.

---

<div class="post-metadata">

**Author:** ![Harshil\_Gandhi](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/harshil_gandhi/32/6222_2.png) [@Harshil\_Gandhi](https://community.cumulocity.com/u/Harshil_Gandhi)\
**Post date:** [October 24, 2022, 9:12am UTC](https://community.cumulocity.com/t/api-endpoint-to-query-poll-live-event-data-of-device-all-device/904/6 "2022-10-24T09:12:58Z")

</div>

![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/d/5/d5a60b997ab9cc8b96da7a774a7023a41135ad78.png)

This is copied from sample.

As you can see, the URL is pointed to websocket endpoint exposed through the Rest Endpoint

kindly guide me here

---

<div class="post-metadata">

**Author:** ![Darpankumar\_Lalani](https://avatars.discourse-cdn.com/v4/letter/d/e9bcb4/32.png) [@Darpankumar\_Lalani](https://community.cumulocity.com/u/Darpankumar_Lalani)\
**Post date:** [October 27, 2022, 5:57am UTC](https://community.cumulocity.com/t/api-endpoint-to-query-poll-live-event-data-of-device-all-device/904/7 "2022-10-27T05:57:10Z")

</div>

Hi,  
You can use any external REST API to get data( I think absolute URL is required). In this sample, it is pointed to our external API gateway.  
If you have external API which can give data that you like to display in Grid, then you can consider this widget.  
However, this widget doesn’t have any Realtime/web socket implementation. You can raise feature request [here](https://github.com/Cumulocity-IoT/cumulocity-rest-based-grid-widget/issues)

Rest based grid widget is available as open source, users are free to use, fork and modify them and contribute back to the community.

---

<div class="post-metadata">

**Author:** ![Harshil\_Gandhi](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/harshil_gandhi/32/6222_2.png) [@Harshil\_Gandhi](https://community.cumulocity.com/u/Harshil_Gandhi)\
**Post date:** [October 27, 2022, 8:49am UTC](https://community.cumulocity.com/t/api-endpoint-to-query-poll-live-event-data-of-device-all-device/904/8 "2022-10-27T08:49:18Z")

</div>

can i use this component to query internal apis for events?

I tried hooking up {url}//event/events ,though list is not getting populated

Also,how to configure secured endpoint since the widget has no option to feed in credentials

---

<div class="post-metadata">

**Author:** ![Harshil\_Gandhi](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/harshil_gandhi/32/6222_2.png) [@Harshil\_Gandhi](https://community.cumulocity.com/u/Harshil_Gandhi)\
**Post date:** [October 27, 2022, 9:37am UTC](https://community.cumulocity.com/t/api-endpoint-to-query-poll-live-event-data-of-device-all-device/904/9 "2022-10-27T09:37:24Z")

</div>

![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/6/f/6f1d0f994c8367befdab8e5e3a4c6325afb6db17.png)

Using Rest based run time widget prompts authentication everytime i load the page

---

<div class="post-metadata">

**Author:** ![Darpankumar\_Lalani](https://avatars.discourse-cdn.com/v4/letter/d/e9bcb4/32.png) [@Darpankumar\_Lalani](https://community.cumulocity.com/u/Darpankumar_Lalani)\
**Post date:** [October 27, 2022, 11:17am UTC](https://community.cumulocity.com/t/api-endpoint-to-query-poll-live-event-data-of-device-all-device/904/10 "2022-10-27T11:17:13Z")

</div>

Its good idea to support APIs with option to configure credentials. At this moment this is not supported.

---

<div class="post-metadata">

**Author:** ![Harshil\_Gandhi](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/harshil_gandhi/32/6222_2.png) [@Harshil\_Gandhi](https://community.cumulocity.com/u/Harshil_Gandhi)\
**Post date:** [October 27, 2022, 11:30am UTC](https://community.cumulocity.com/t/api-endpoint-to-query-poll-live-event-data-of-device-all-device/904/11 "2022-10-27T11:30:08Z")

</div>

This component is not qualified to become runtime widget  
it is not tested and deceptive .please remove it from supported list , most of the things are not not supported except demos

API endpoints are meant to be protected through authorization ,With lack of this design in mind,Restbased Grid widget  
Hardly any developer would ‘Drag and Drop’ grid and see static data then!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [April 25, 2023, 11:30am UTC](https://community.cumulocity.com/t/api-endpoint-to-query-poll-live-event-data-of-device-all-device/904/12 "2023-04-25T11:30:54Z")

</div>

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