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
14 replies
Subscribers
5 subscribers
Views
5417 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
I am still working on Appian to JIRA integration. I have made some progress in
helmuta
over 10 years ago
I am still working on Appian to JIRA integration. I have made some progress in that I can query JIRA to return a list of projects by name and key as well as retrieving data from a specific field. Now I am trying to tackle writing to JIRA. My first attempt is to just write a comment to one JIRA issue. I am not having any luck. Does anyone have any experience that is willing to share. Any help would be greatly appreciated.
Here is a code snipped:
a!httpWrite(
method:"PUT",
url: "
sni-digital-dev.atlassian.net/.../12104",
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: "body", value: {"Adding a comment to this issue"}),
},
OriginalPostID-144367
OriginalPostID-144367
Discussion posts and replies are publicly visible
0
PhilB
A Score Level 1
over 10 years ago
Try this:
a!httpQuery(
url:"
SERVERNAME:85/.../",
method :"GET",
queryParameters: {
a!httpQueryParameter(
name: "xpath",
value: "/FRC_Department"
),
a!httpQueryParameter(
name: "attributes",
value: "DisplayName/FirstName"
)
},
basicAuthenticationCredentials : a!httpAuthenticationBasic(
username: a!scsField(
externalSystemKey: "testWebAPI",
fieldKey: "username",
usePerUser :false()
),
password: a!scsField(
externalSystemKey: "testWebAPI",
fieldKey: "password",
usePerUser :false()
)
),
preemptive :true()
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jasmins
over 10 years ago
@Philb ,As you mentioned,i have tried your code but it's giving me below error and you can see while forming xpath query "%2F" coming instead of "/".
success:false,result:,error:[code:[category:0,namespace:1,detail:0],title:HTTP error connecting to http://SERVERNAME:85/api/resource/?xpath=%2FFRC_Department&attributes=DisplayName%2FFirstName,message:HTTP/1.1 401 Unauthorized,detail:No details available]]
and do we need to pass authorization in header part?
something like this
headers:{
\ta!httpHeader(
\ tname : "Authorization",
\ tvalue : "Basic XXXXXXXXX"
\t)
}
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 10 years ago
You don't need the authentication in the headers, though it's not a bad idea to include a content-type header.
The 401 unauthorized message you're seeing is simply a login failure; have you checked the logs on the destination server to see why this is happening?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jasmins
over 10 years ago
Ok,We will check the log and update you...
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
<