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
10 replies
Subscribers
7 subscribers
Views
4012 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Integrations
I am trying to follow this example
ishaanim
over 9 years ago
I am trying to follow this example
forum.appian.com/.../Connector_Functions.html
where Appian is consuming data from weather API exposed by Yahoo.
Getting the following error: Interface Definition: Expression evaluation error at function a!fromJson [line 15]: Invalid index: Cannot index property 'body' of type Text into type Text
OriginalPostID-185714
OriginalPostID-185714
Discussion posts and replies are publicly visible
0
PhilB
A Score Level 1
over 9 years ago
At a guess, the response you're getting does not contain an element of body. Try running the below in an expression rule and paste the result here so we can see what's wrong.
a!httpQuery(
/* Details about the Yahoo! Weather API can be found at:
developer.yahoo.com/.../
*/
url: "
query.yahooapis.com/.../yql",
queryParameters: {
/* a!httpQuery will automatically url-encode query parameters for you,
* so it's OK to include spaces in the value of a query parameter */
a!httpQueryParameter(
name: "q",
value: "select * from weather.forecast where woeid = 2514815"
),
a!httpQueryParameter(
name: "format",
value: "json"
),
a!httpQueryParameter(
name: "env",
value: "store"
)
}
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ishaanim
over 9 years ago
Could not display interface. Please check definition and inputs.
Interface Definition: Not a valid component. Received: [success:false,result:,error:[code:[category:0,namespace:1,detail:0],title:Error Calling httpQuery,message:Failed to connect to
query.yahooapis.com/.../yql,detail:Connect
to query.yahooapis.com:443 [query.yahooapis.com/98.137.200.255] failed: Connection refused],@attributes:[@anyAttribute:[_dirty:false,_bannerText:,_refresh:]]]
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
Looks like Appian is not able to connect to the URL that's being requested - this could be due to network restrictions on your Appian instance so I'd check with whoever is responsible for the Appian server.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ishaanim
over 9 years ago
okay. Thank you Phil
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
No problem!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ishaanim
over 9 years ago
Can you tell me how to send url embedded parameters in a Rest Call?
I have the following URL : https:/my/path/{id}
I need to pass id as a parameter from Appian.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 9 years ago
That very much depends on the format of the parameters - are they JSON-based or just query parameters? If they are the latter then follow the example below, noting how the a!httpQueryParameter() function is used:
forum.appian.com/.../Connector_Functions.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ishaanim
over 9 years ago
The parameters are JSON Based to send url embedded parameters? Can we send CDT as request body for REST call?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
sagarl511
A Score Level 2
over 9 years ago
From m y understanding, you can use a!toJson function to convert cdt to json string
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
ishaanim
over 9 years ago
Cant I send CDT as post parameters? How to send this converted cdt as post parameter?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel