Any way to list the projects and issues

Dave March 23, 2012

Hi

Anybody know of a way to use the REST API to list out the Projects and Issues (or does one need to know these a head of time)?

Thanks

2 answers

1 vote
Dave March 25, 2012

Simon

Thank you for the response. As nearest as I can tell, I can use this to get a project keys:

http://my_jira.com/rest/api/latest/project

However, this seems to only accept an issue_key (not a project key).

http://my_jira.com/rest/apilatest/issue/ISSUE_KEY

Therefore I need to know the issue key before I can query it?

Instead I am trying to get all the infromationf or all issues for a given proejct Key.

Any ideas?

thanks

Dave

SimonS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 26, 2012

Hmmm this probably isn't part of the REST API yet, if it isn't listed on the developer site explicitely. I think this is possible with the SOAP, API, though.

Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 26, 2012

Why not use the "/rest/api/2/search" and pass the jql as "project = <<project key that you want>>". This should give you all issues for that project.

Dave March 26, 2012

Thanks again for the responses. So, it looks like the REST API does NOT allow you to list the issues within a specific proejct. I *could* tough create a filter BUT this appears to be BROKE:

http://MYJIRASITE.com/rest/api/latest/search?jql=filter=MYFILTER&startAt=1&maxResults=55

RETURNS:

RET={"startAt":0,"maxResults":50,"total":313,"issues":[{ . . . shows 50 records data
NOTE it ignores the startAT and MaxResults parms. 
Is this a BUG? Am I missing something?
 
Dave 
0 votes
SimonS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 23, 2012

Hey David,

There is an API call available in JIRA 5 to do this for projects:

https://developer.atlassian.com/static/rest/jira/5.0.html#id198075

I don't think there is a call to get all issues of a project, but you could programatically get the issues once you get ahold of the project key:

https://developer.atlassian.com/static/rest/jira/5.0.html#id199677

-Simon

Suggest an answer

Log in or Sign up to answer