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
5407 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
I think your queryParameter should actually be something like:
a!httpQueryParameter(
name: "data"
value: "{""body"": ""Adding a comment to this issue""}"
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 10 years ago
Sorry, I missed a comma after the "data" part:
a!httpQueryParameter(
name: "data",
value: "{""body"": ""Adding a comment to this issue""}"
)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
helmuta
over 10 years ago
No luck with this code either. Here is the code snipped that I use for the query:
index(index(a!httpQuery(
method:"GET",
url: "
sni-digital-dev.atlassian.net/.../project
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: "jql", value: {""}),
},
basicAuthenticationCredentials:a!httpAuthenticationBasic(
username:a!scsField( externalSystemKey:"test", fieldKey:"username", usePerUser:false()),
password:a!scsField( externalSystemKey:"test", fieldKey:"password", usePerUser:false()),
preemptive:true()
)
),"result",{}),"body",{}),
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
PhilB
A Score Level 1
over 10 years ago
Not exactly sure what you're trying to do there, but I guess you're trying to use this call:
docs.atlassian.com/.../
...?
If so, it should probabaly look a bit like this - I'm not sure exactly what the expanded field names should be so I've just put in "name" for now. also the user will need some projects, otherwise presumably you'll get an empty result.
a!httpQuery(
method: "GET",
url: "
sni-digital-dev.atlassian.net/.../project",
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: "expand",
value: "name"
)
},
basicAuthenticationCredentials: a!httpAuthenticationBasic(
username: a!scsField(
externalSystemKey: "test",
fieldKey: "username",
usePerUser: false()
),
password: a!scsField(
externalSystemKey: "test",
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
Hi,
I also want to use third party credentials for REST API,but getting error in connection..
a!httpQuery(
url:"
http://SERVER_NAME/locations"
,
method :"GET",
basicAuthenticationCredentials : a!httpAuthenticationBasic(
username : a!scsField(
externalSystemKey : "externalSystemKey",
fieldKey : "usernameKey" ),
password : a!scsField(
externalSystemKey : "ExternalSystemKey",
fieldKey : "passwordKey"
)))
Error :[success:false,result:,error:[code:[category:0,namespace:1,detail:0],title:HTTP error connecting to
SERVER_NAME/.../1.1
401 Unauthorized,detail:No details available]]
Please let me know how to resolve this?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
helmuta
over 10 years ago
Sounds like you are not authenticating properly. Is this all of your code?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jasmins
over 10 years ago
Yes,Code is same ,we can not provide actual value for URL. On Admin console page Third party credentials have been set.
Do we need to provide any value in header part?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
helmuta
over 10 years ago
I did not have to provide that information. Not having the url could be a problem. Are you planning on passing it as a variable paramter? One thing I found helpful with getting my query working is using the browser to test the query before I put it in Appian. I will attach the browser test link and the corresponding Appian code snipet in an attachment.
JIRA Testing.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
helmuta
over 10 years ago
Sorry I missing part of the code.
JIRA Testing.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
jasmins
over 10 years ago
In below code you can find url, but we can't provide you server name,One more thing same credentials are working with httpget() function.
a!httpQuery(
url:"
SERVERNAME:85/.../
method :"GET",
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
>