Is it possible to get the history of an issue using the JIRA REST API?
Hi,
I'm using the REST interface in Excel with VBA.
I know that expand=changelog should do the job, but I get the same result either with this expresson or without it.
I attached my test code and both Debug.Print deliver exactly the same result
Any idea what's wrong?
Also ?fields does not work for GET.
So any other idea how I can get the change history for an item or can get access to single fields with my version?
Many Thanks!
Dieter
Private JiraService As New MSXML2.XMLHTTP60 Private JiraAuth As New MSXML2.XMLHTTP60 Public sRestAntwort As String Sub JiraAccess() With JiraAuth .Open "POST", "http://JiraServer/rest/auth/1/session", False .setRequestHeader "Content-Type", "application/json" .setRequestHeader "Accept", "application/json" .Send " {""username"" : ""user"", ""password"" : ""passwd""}""" sCookie = "JSESSIONID=" & Mid(sErg, 42, 32) & "; Path=/Jira" End With With JiraService .Open "GET", "http://JiraServer/rest/api/2.0.alpha1/issue/JRA-444", False .setRequestHeader "Content-Type", "application/json" .setRequestHeader "Accept", "application/json" .setRequestHeader "Set-Cookie", sCookie .Send sRestAntwort = .responseText Debug.Print "*************************" Debug.Print .responseText Debug.Print "*************************" End With With JiraService .Open "GET", "http://JiraServer/rest/api/2.0.alpha1/issue/JRA-444?expand=changelog", False .setRequestHeader "Content-Type", "application/json" .setRequestHeader "Accept", "application/json" .setRequestHeader "Set-Cookie", sCookie .Send sRestAntwort = .responseText Debug.Print "*************************" Debug.Print .responseText Debug.Print "*************************" End With With JiraAuth .Open "DELETE", "http://JiraServer/rest/auth/1/session", False .Send End With End Sub
Community moderators have prevented the ability to post new answers.
Using expand=changelog does give you the full issue history, not just the worklog. For example:
https://jira.atlassian.com/rest/api/2/issue/JRA-1234.json?expand=changelog
But it probably is not supported for JIRA 4.4 (which is way past EOL)
From my understanding of the API documentation (https://docs.atlassian.com/jira/REST/latest/) you will only be able to get the worklog, not all the issue details calling this method.
;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Pedro, check out the information returned from
https://jira.atlassian.com/rest/api/2/issue/JRA-1234.json?expand=changelog
under changelog, histories. That looks like the issue history tab info to me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.