cancel
Showing results for 
Search instead for 
Did you mean: 

Looking to execute HTTP Request using body in SPA

ronhagan
Product and Topic Expert
Product and Topic Expert
0 Kudos

I'm trying to execute an HTTP POST request by passing in the JSON body with the correct parameters but I can't seem to find a tutorial that covers that.  I've tried using the API trigger but for some reason it's not working. I can't seem to figure out how to configure it properly.  The API I'm trying to connect to is already in the BTP Destinations and I can connect through Postman.

Does anybody happen to have either a tutorial or a sample project that would get me closer to being able to accomplish my goal?  Or maybe some guidance?  😊

Thanks in advance!

Ron

View Entire Topic
manish_09
Explorer
0 Kudos

You will need to create JavaScript code for the body, and you can use the 'Call Web Service with Destination' activity to call that API.

You can refer to the following BOT from the store; they have used an API to download files from the DMS service.

manish_09_0-1708578214473.png

 

ronhagan
Product and Topic Expert
Product and Topic Expert
0 Kudos
Thank you, Manish! I have a question for you. In the section "Build an Automation", step 7 says to drag and drop the activity Call Web Service with Destination. I've tried that but I can't seem to get it to connect. When I click on the activity, instead of just outlining it in red, there is also a big "X" in the top right-hand corner of the activity. How do I get it to connect to the flow?
ronhagan
Product and Topic Expert
Product and Topic Expert
0 Kudos
Ha! I think I figured it out. I had to put in the Destination firs. 🙂
ronhagan
Product and Topic Expert
Product and Topic Expert
0 Kudos
Next question: 🙂 I created the Automation like it said in the tutorial and instead of having a Start circle and an End circle, mine also has a has a box above the Start circle that says, "Triggers" with a "+" sign on the right side of it. Since it's not in the tutorial, do I need it? It appears that I can't delete it but I have no idea what to do with it.
manish_09
Explorer
0 Kudos

Hi Ron,

The trigger option is used when you need to trigger a process using an API; otherwise, you don't need to do anything.

ronhagan
Product and Topic Expert
Product and Topic Expert
0 Kudos
I got it! I was able to successfully test the Process. WHOO-HOO!!!