Rest API Call in AEM forms | Community
Skip to main content
Level 3
March 13, 2024
Question

Rest API Call in AEM forms

  • March 13, 2024
  • 1 reply
  • 607 views

Hi All,

 

We have a Rest API implementation where we are calling a Bank API by passing Oauth token to the Bank API.

The balance details has to be populated from the API response and needs to be shown on the front end.

We want to implement the same in AEM forms.

 

 

Easier Approach Solution 1:

1)Create a form Element and have a Id attached to it.

2)Create a Client Library JS code where we will have a ajax call to our Servlet and Our Servlet will have the HTTPClient Code to consume the APi and we can send the details to the front end and our front end will display details and we can show that using javascript.

 

But the concern  with this approach we are not using any core AEM forms Functionality here and not levaraging any core aem forms capability here.

 

Need Suggestions how we can do this type of implementation levaraging AEM forms and use more of authoring capability of aem forms.

 

thanks in advance

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Adobe Employee
March 18, 2024

Hi,

You could use a prefill service to achieve the same I guess.

https://experienceleague.adobe.com/en/docs/experience-manager-learn/forms/prefill-fdm-db/introduction

 

Thanks and Regards