cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Build Apps subscribe to SAP Event Mesh

SAPWayneSG
Participant
0 Kudos

Dear all,

Has anyone used SAP Build Apps to consume message from SAP Event mesh?

Need some guide on how to connect it.

Regarding to the use case, it's an IoT project, let's assume following scenario:

1. I have a flower pot, I use a sensor to monitor its moisture

2. A Raspberry PI read the moisture data and send it to a SAP Build Apps via Event Mesh service.

3. SAP Build Apps will show the real time moisture status on the mobile and alert user to water the pot if it's too dry.

Accepted Solutions (0)

Answers (3)

Answers (3)

johna69
Product and Topic Expert
Product and Topic Expert
0 Kudos

The SAP Samples GitHub repo has examples of Appgyver and OAuth2. It may be a good place to start:

https://github.com/SAP-samples/appgyver-auth-flows

Regards

SAPWayneSG
Participant
0 Kudos

Thanks John, this sounds promising. I will take a try and update you thereafter.

johna69
Product and Topic Expert
Product and Topic Expert
0 Kudos

Are you looking to persist the data or simply get the latest value?

I have a similar project for a Smart Garden using CAP to store the data. Consuming Rest services from BTP is straightforward, create a BTP destination for the CAP service and it can be consumed in Build Apps.

Tom Jung has a Tech Byte example on basic rest API.

https://www.youtube.com/watch?v=cH9mG77UubA

There is also the mission in developer center:

https://developers.sap.com/tutorials/appgyver-connect-publicapi.html

SAPWayneSG
Participant
0 Kudos

Hi John,

Thanks for the recommended reading, very good tutorial.

I notice that this REST API no need any authentication, it can be accessed free of charge. For example we can send GET request to below URL:

https://world.openfoodfacts.org/api/v0/products/3017620422003

To retrieve a json string about product "Nutella".

I wonder whether it support authentication such as OAuth2, as Event Mesh use OAuth2.

yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos

sapwaynesg

I am not sure what would your use case for SAP Build Apps with Event Mesh...

you can refer this blog, where I have mentioned the APIs for queue ... you can build it in Build Apps

https://blogs.sap.com/2023/02/13/sap-event-mesh-what-is-publish-consume-messaging-queue-pattern/

SAPWayneSG
Participant
0 Kudos

Thanks Yogananda for the informative blog, in your demo, you use node.js with Business Application Studio to call the REST API.

I wonder whether we can do the same in SAP Build Apps (previously it's called AppGyver).

Any example on how to call REST API from SAP Build Apps will be great.

Regarding to the use case, I just revised my original question to include a use case there.