It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

400 error returned when access Jira rest api with excel vba(Jira version is 7.6.9)

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"
.SetRequestHeader "Authorization", "Basic " & usernamep
End If


1 answer

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 & """}"


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

245 views 1 2
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you