Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
5 replies
Subscribers
8 subscribers
Views
6478 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I am using a!httpQuery() for calling a REST based API. I have tested it wit
chetany
A Score Level 1
over 9 years ago
I am using a!httpQuery() for calling a REST based API.
I have tested it with POSTMAN, a Google chrome plugin REST client. I get a JSON response back.
But when I tried using a!httpQuery() in Appian for calling REST API, I am getting a 'Connection Timed Out' error.
I am using Appian 7.10 installed on my own local machine.
The error is as follows:
success:false,result:,error:[code:[category:0,namespace:1,detail:0],title:Error Calling httpQuery,message:Failed to connect to
openstates.org/.../,detail:Connect
to openstates.org:80 [openstates.org/184.73.176.218] failed: Connection timed out: connect]]
Let me know what I am missing.
OriginalPostID-159295
OriginalPostID-159295
Discussion posts and replies are publicly visible
0
chetany
A Score Level 1
over 9 years ago
The code is as follows. I am calling the same REST based API which is given in Service backed records example on the forum. (
forum.appian.com/.../Service-Backed_Record_Tutorial.html)
with(
local!apiParameter: a!httpQueryParameter(
name: "apikey",
value: <MYAPIKEY>
),
local!stateParam: a!httpQueryParameter(
name: "state",
value: "VA"
),
local!fieldParam: a!httpQueryParameter(
name: "fields",
value: "leg_id,first_name,last_name,middle_name,chamber,district,party"
),
local!response: a!httpQuery(
url: "
openstates.org/.../",
method: "GET",
queryParameters: {
local!apiParameter,
local!stateParam,
local!fieldParam
}
),
local!response
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Eduardo Fuentes
Appian Employee
over 9 years ago
Maybe your application server doesn't have direct access to the public Internet since this is a site outside your intranet.
The error suggests that the app server cannot communicate with that endpoint
Connection timed out: connect
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
swapnac
over 7 years ago
in reply to
Eduardo Fuentes
Hi Eduardo,
we are getting same connection time out error for particular REST API in cloud environment but if we test through SOAPUI, we are getting response. Do I need to modify application server path? Can you suggest which settings I need to modify to overcome this connection time out error.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sureshg57
over 7 years ago
Since you are trying to access the rest API with in organization network, just try and access the end point via your browser and see you can access it. If you can not do it then that means then even though your Appian instance is on premise it will not be able to access it. Other thing is check if the service is really up and running. these can lead to find a solution for you
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
rajeshm0001
over 7 years ago
I am also facing the similar issue , our appian server is running on intranet and I am able to connect internal organisational URLs but not able to connect public URLs. Can anyone please help me to sort out this issue?
Thanks in advance.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel