Hi there–
We automated our JIRA issue reports using VBA. We had been doing authentication via cookies, however this process has been deprecated and no longer works.
Therefore, I have been attempting to use a JIRA token for authentication, passing it on in the header of the issue search URL. This URL includes JQL statements to filter the search.
The VBA snippet looks like this:
With jiraService
.Open "GET", url, False
.setRequestHeader "Authorization", authenticationStr
.setRequestHeader "Content-Type", "application/json"
.setRequestHeader "Accept", "application/json"
.send
If Not .Status = 200 Then
MsgBox ("Project Key, username/password, or JQL invalid, or Jira is unreachable")
End
End If
sRestAntwort = .responseText
End With
JiraService is a MSXML2.XMLHTTP60 object
The url looks like:
https://mycompany.atlassian.net/rest/api/latest/search?jql=project=IGT2&maxResults=100&startAt=0
The authenticationstring is in the format:
“Basic [Base64 conversion of username:token]”
I’ve done a lot of REST work, and have never had problems logging in. But I can’t seem to get away from this 401 error!
Thanks for any info or suggestions you may have!
Eric