Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Invoke REST API - AEM 6.3 Forms

Avatar

Avatar
Validate 10
Level 2
Krisgum
Level 2

Likes

12 likes

Total Posts

67 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 2
Krisgum
Level 2

Likes

12 likes

Total Posts

67 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
Krisgum
Level 2

20-06-2017

Hi Guru's ,

I'm currently exploring AEM 6.3 forms and trying out a usecase to invoke a rest endpoint on click of a button .

I achieved this use case in AEM 6.2 via code editor where on click event I was excuting a peice of java script code which would make a ajax style call to rest API and render the response .

I'm trying to see if there is any better way to acheive this in AEM 6.3 .

I do not have the swagger file for the REST API and it is a third party service . Will i still be able to use Forms data integrations ? Or Is there any GuideUtils API to invoke rest based endpoints or java script way is the best to go  ? I found the article below  to execute SOAP based services , however couldn't find any thing similar for rest based calls ?

AEM 6.2 Forms Help | API to invoke web services from adaptive forms

Thanks in advance

Replies

Avatar

Avatar
Validate 10
Level 5
DarrenBiz
Level 5

Likes

67 likes

Total Posts

205 posts

Correct Reply

37 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 5
DarrenBiz
Level 5

Likes

67 likes

Total Posts

205 posts

Correct Reply

37 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
DarrenBiz
Level 5

13-07-2017

>> Yes, Currently test UI handles limited set of error cases but if service invocation is failing due to some reason complete details will be available in error log file.

How do you tell the difference between an error and a zero result set when you publish the form into production? The end users won't have access to the error log file. They will just think their search returned zero results. You can't tell using any of the available form APIs either so you can't handle this programmatically.

This is not a small issue - it prevents the whole FDM being used in a real live environment until we can tell the difference.

Avatar

Avatar
Boost 1
Level 2
user2062153
Level 2

Likes

2 likes

Total Posts

18 posts

Correct Reply

2 solutions
Top badges earned
Boost 1
Affirm 1
View profile

Avatar
Boost 1
Level 2
user2062153
Level 2

Likes

2 likes

Total Posts

18 posts

Correct Reply

2 solutions
Top badges earned
Boost 1
Affirm 1
View profile
user2062153
Level 2

13-07-2017

Hi Darren,

Yes, Currently its very difficult to track if form submission or invoke service is failing and bug is logged for propagating error message from FDM to Forms and display in UI

Avatar

Avatar
Boost 1
Level 1
ravi_ks007
Level 1

Like

1 like

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
ravi_ks007
Level 1

Like

1 like

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
ravi_ks007
Level 1

03-01-2018

Hi Darren,

Did you get any response from Adobe on the response from the service? We have started on forms now and we have similar requirements, could you please confirm on the outcome? Thanks

Avatar

Avatar
Validate 10
Level 5
DarrenBiz
Level 5

Likes

67 likes

Total Posts

205 posts

Correct Reply

37 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 5
DarrenBiz
Level 5

Likes

67 likes

Total Posts

205 posts

Correct Reply

37 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
DarrenBiz
Level 5

01-02-2018

Not yet. I am going to take a look at the Beta now it is out and have a look.

Avatar

Avatar
Validate 10
Level 5
DarrenBiz
Level 5

Likes

67 likes

Total Posts

205 posts

Correct Reply

37 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 5
DarrenBiz
Level 5

Likes

67 likes

Total Posts

205 posts

Correct Reply

37 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
DarrenBiz
Level 5

26-04-2018

Ok so I thought I would update this thread since I have checked out AEM Forms 6.4 Form Data Models offering. While there has been a few updates on some features including Cloud Services Configurations and Computed Properties [1], unfortunately there still doesn't seem to be a solution for handling statuses generated by erroneous FDM calls. We still have no way to tell the user if a search returned zero results or has thrown an error.

Adobe did release some info in AEM 6.3 / 6.4 on the API to execute the data calls [2], but it doesn't include a way to handle the status returned by the API call. Bit of a shame because there has been so much effort put into this feature that is still (by all accounts) unuseable for anything other than demos.

It would be helpful if Adobe could explain why returning a service status is so far down on the backlog it never made it into this release?

[1] Adobe Experience Manager Help | New features summary | AEM 6.4 Forms

[2] Adobe Experience Manager Help | API to invoke form data model service from adaptive forms

Avatar

Avatar
Validate 10
Level 5
DarrenBiz
Level 5

Likes

67 likes

Total Posts

205 posts

Correct Reply

37 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 5
DarrenBiz
Level 5

Likes

67 likes

Total Posts

205 posts

Correct Reply

37 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
DarrenBiz
Level 5

26-04-2018

Edit - I just found the ApiResponse Object in the DEFAULT_SCHEMA. Nothing found on how to use it so I'll have to figure it out

1474475_pastedImage_0.png

Edit 2 - Ok it seems this is provided by the Swagger PetStore test API and not AEM Forms. Doesn't seem to be useable - Adobe?

Avatar

Avatar
Level 1
jasons25523625
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
jasons25523625
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
jasons25523625
Level 1

30-08-2018

This is a worrying shortcoming of the solution. We're new to AEM Forms and REST integration will be essential and I really need to recognise success vs error responses and handle them appropriately.