How to call REST api using Javascript in Designer?

Avatar

Avatar
Validate 1
Level 1
mak4753
Level 1

Like

1 like

Total Posts

9 posts

Correct reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
mak4753
Level 1

Like

1 like

Total Posts

9 posts

Correct reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 1
Affirm 1
View profile
mak4753
Level 1

22-07-2018

I want to first check if the Rest api is online or offline before actually submitting the form to the same. How can I do that using javascript in Forms Designer?

Accepted Solutions (0)

Answers (5)

Answers (5)

Avatar

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Establish
MVP
_Bruce_Robertson
MVP

Likes

271 likes

Total Posts

1,782 posts

Correct reply

372 solutions
Top badges earned
Establish
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile
_Bruce_Robertson
MVP

24-07-2018

You can also use the FormCalc functions to call a web service and I've an example with this sample Adobe LiveCycle Designer Cookbooks by BR001: Calling a RESTful web service from a PDF form.  Which also shows how to call FormCalc functions from JavaScript.

You get some do you trust this... sort of security messages, but you can select remember decision.

Avatar

Avatar
Boost 5
Level 3
Thom_Parker
Level 3

Likes

5 likes

Total Posts

90 posts

Correct reply

2 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Boost 5
Level 3
Thom_Parker
Level 3

Likes

5 likes

Total Posts

90 posts

Correct reply

2 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
Thom_Parker
Level 3

24-07-2018

This is something you'll need to setup yourself. The NET.HTTP object provides functionality for making raw HTTP Requests.  It's a matter of setting the request parameters to match the Rest API.

Avatar

Avatar
Validate 1
Level 1
mak4753
Level 1

Like

1 like

Total Posts

9 posts

Correct reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
mak4753
Level 1

Like

1 like

Total Posts

9 posts

Correct reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 1
Affirm 1
View profile
mak4753
Level 1

23-07-2018

Thanks Thom for the inputs. Can you please share a sample code of the same so that I can try?

Avatar

Avatar
Boost 5
Level 3
Thom_Parker
Level 3

Likes

5 likes

Total Posts

90 posts

Correct reply

2 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Boost 5
Level 3
Thom_Parker
Level 3

Likes

5 likes

Total Posts

90 posts

Correct reply

2 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
Thom_Parker
Level 3

23-07-2018

You can call the Rest API from the NET.HTTP object.

Avatar

Avatar
Boost 5
Level 4
BarlaeDC
Level 4

Likes

23 likes

Total Posts

160 posts

Correct reply

30 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Applaud 5
View profile

Avatar
Boost 5
Level 4
BarlaeDC
Level 4

Likes

23 likes

Total Posts

160 posts

Correct reply

30 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Applaud 5
View profile
BarlaeDC
Level 4

23-07-2018

Moving to Livecycle Designer forum.