Good morning,
As the subject states, I am looking for a way to retrieve a list of all commits for a given issue via the rest interface for JIRA. I have seen other examples online, but it would appear that these are either an old version of the api or for another product, eg:
https://(jira-instance)/rest/dev-status/latest/issue/detail?issueId=(issueid)&applicationType=stash&dataType=repository
If I attempt the above against our server with a ticket of (as an example) ABC-123, I always get an error: '
{"errorMessages":["An invalid ID was provided: 'ABC-123'"],"errors":{}}
Please tell me there's a means to do this via the REST interface. FWIW, we are running JIRA v7.3.0.
Thanks in advance!
Hi Reuben,
The problem you are running into is that you are not providing a valid issueID. An issueID is not the same as an issue key. ABC-123 is an issue key. In order to find the issueID of your issue, run the following SQL query against your database:
SELECT ID FROM jiraissue WHERE issuenum = '123' AND project = (SELECT ID FROM project WHERE pkey = 'ABC');
Be sure to switch out the 'ABC' and '123' with your issue key values. The output from this will be your issueID. Plug this value into your REST API call. Hope this helps.
Cheers
~Andrew Sweeten
Atlassian Support
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.