How can i pull data from cumulocity

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

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 2.0 - Cumulocity IoT Guides
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?

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?

Hi Sumit,

if it is about sending a String/JSON to a device, the Shell command 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. 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 as it is the same topic.

Best regards
Christian

2 Likes

Thanks for your support Christian.

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