Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Http submit button calling REST API

Avatar

Level 3

Ok so i have my REST API in iis. for testing based on @workflowuser advice was to use an HTTP submit button. so I built something simple. I hardcoded the REST API call and when i click the button I get...Capture.JPG

an http 405 error.

 

Capture1.JPG

 

@workflowuserdo you have any examples on how to actually build the call to a GET rest api? and lastly i would like the response to be into that textfield. Please help I am at a lost.

4 Replies

Avatar

Level 9

I am not sure on how to populate fields on the form using REST endpoint response 

what is your use case?

Avatar

Level 3

@GirishBedekar the use case is just to get a JSON String from a database. I wanted to use REST API instead of SOAP web service. I also wanted to use Workbench but I do not see a way for workbench to return a JSON string unless it is programming it with JAVA servlets.

 

So using a HTTP submit button is only for POST? not GET? please advice

 

Thanks

Avatar

Level 9

Yes http post is for submitting the pdf form

What do you intend to do with the response you get from the REST call?

have you considered using adaptive forms instead of pdf form

Avatar

Level 3

@GirishBedekar with the response I intent to prefill my pdf. We are not using adaptive forms for this. Just pdf. 

 

So REST API cannot be use with PDFs?