# How can i pull data from cumulocity

**URL:** https://community.cumulocity.com/t/how-can-i-pull-data-from-cumulocity/3211
**Category:** Forum
**Tags:** cumulocity
**Created:** [March 30, 2022, 7:59am UTC](https://community.cumulocity.com/t/how-can-i-pull-data-from-cumulocity/3211 "2022-03-30T07:59:42Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![sumit.singh](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@sumit.singh](https://community.cumulocity.com/u/sumit.singh)
#### Post date: [March 30, 2022, 7:59am UTC](https://community.cumulocity.com/t/how-can-i-pull-data-from-cumulocity/3211/1 "2022-03-30T07:59:42Z")

</div>

i am able to send meassurments and alarm on cumulocity via mqtt but now i want to pull data from cumulocity,  
if it possible to pull data from cumulocity then how please support me with some example or step by step guids or documents for pulling data from cumolicity

---

<div class="post-metadata">

### Author: ![Stefan\_Witschel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/stefan_witschel/32/31955_2.png) [@Stefan\_Witschel](https://community.cumulocity.com/u/Stefan_Witschel)
#### Post date: [March 30, 2022, 9:06am UTC](https://community.cumulocity.com/t/how-can-i-pull-data-from-cumulocity/3211/2 "2022-03-30T09:06:42Z")

</div>

Hi Sumit,

MQTT in Cumulocity is mainly designed for upstream messages. Only Operations can be handled downstream (on devices) per default. You can define own SmartREST Templates to retrieve data but also this is limited on Inventory or Operations: [SmartREST - Cumulocity IoT Guides](https://cumulocity.com/guides/reference/smartrest-two/#querying-data-from-the-device-object)  
Anything else is bound to the REST API but needs internal ID handling.

Can you describe your use case? What kind of data do you want to pull?

---

<div class="post-metadata">

### Author: ![sumit.singh](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@sumit.singh](https://community.cumulocity.com/u/sumit.singh)
#### Post date: [March 31, 2022, 8:54am UTC](https://community.cumulocity.com/t/how-can-i-pull-data-from-cumulocity/3211/3 "2022-03-31T08:54:24Z")

</div>

thanks Stefan ,  
I need to send a string or json as data from cumulocity to the registered device, i am pulling String kind data or json from cumulocity so guid me how can i pull this kind of data?

---

<div class="post-metadata">

### Author: ![Christian\_Guether1](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/christian_guether1/32/14848_2.png) [@Christian\_Guether1](https://community.cumulocity.com/u/Christian_Guether1)
#### Post date: [April 1, 2022, 6:57am UTC](https://community.cumulocity.com/t/how-can-i-pull-data-from-cumulocity/3211/4 "2022-04-01T06:57:54Z")

</div>

Hi Sumit,

if it is about sending a String/JSON to a device, the [Shell command](https://cumulocity.com/guides/reference/device-management-library/#reference) might fit best in this case. It already comes with a built-in SmartREST template. You just need to subscribe to the topic `s/ds` for your device to receive a shell operation.

You need to first announce the capabilities of your device to Cumulocity as described in the [guide](https://cumulocity.com/guides/reference/device-management-library/#announcing-capabilities). This means, you need to tell Cumulocity that your device actually supports shell command operations. You can use the static template `114` for this to publish a message on the topic `s/us`. For example: `114,c8y_Command`.

Once you have done this, the Shell tab should appear for your device.

You can also follow the discussion [here](https://community.cumulocity.com/t/how-to-send-write-data-to-a-point-device-from-cumuloicty/4076) as it is the same topic.

Best regards  
Christian

---

<div class="post-metadata">

### Author: ![sumit.singh](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@sumit.singh](https://community.cumulocity.com/u/sumit.singh)
#### Post date: [April 1, 2022, 9:46am UTC](https://community.cumulocity.com/t/how-can-i-pull-data-from-cumulocity/3211/5 "2022-04-01T09:46:32Z")

</div>

Thanks for your support Christian.

---

<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: [June 30, 2022, 9:46am UTC](https://community.cumulocity.com/t/how-can-i-pull-data-from-cumulocity/3211/6 "2022-06-30T09:46:51Z")

</div>

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