I am trying to access Jira rest api(Jira vision 7.6.9) with Excel vba, it always returns 400 and no response text at all.
It works with old version Jira rest api. Is there any issue with my script?
The script is as follows:
usernamep = UserPassBase64
With JiraService
s = GetUrl + "/rest/api/2/search?jql=" + Query + "&startAt=" + _ CStr(Range("StartAt").Value) + "&maxResults=" + _ CStr(Range("MaxResults").Value)
.Open "GET", s
.SetRequestHeader "Content-Type", "application/json"
.SetRequestHeader "Accept", "application/json"
If usernamep = "NoAuth" Then
.SetRequestHeader "Authorization", "No Auth"
Else
.SetRequestHeader "Authorization", "Basic " & usernamep
End If
.Send
Hello @Geo Zhang
Did you get any answer about this? I have the same problem : 400 status with an empty response . Is it something missing in the requestHeader ?
Here is my script :
With JiraService
.Open "GET", URLticket, False
.setRequestHeader "Accept", "application/json"
.setRequestHeader "X-Atlassian-Token", "no-check"
.setRequestHeader "Origin", URLJIra
.setRequestHeader "Content-Type", "application/json"
.setRequestHeader "Authorization", "Basic " + Base64Encode(loginJIRA + ":" + pwdJIRA)
.send " {""username"" : """ & loginJIRA & """, ""password"" : """ & pwdJIRA & """}"
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.