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
7 subscribers
Views
6089 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 8 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
Parents
0
chetany
A Score Level 1
over 8 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
Reply
0
chetany
A Score Level 1
over 8 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
Children
No Data