Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Obtain status category using Java Rest Java Client library

MarkRx June 27, 2016

Hi,

I'm using the JRJC rest API and am looking for a way to get status category information. I do not see any way to do this using the JRJC libraries. Is this missing because the targeted minimum JIRA version does not have status categories supplied via REST? Would there be an easy way for me obtain the status categories?

 

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Petar Petrov (Appfire)
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.
June 27, 2016

Which JIRA version are you targeting?
The REST API contains endpoints for getting information about all categories, as well as the current category of a given issue (since JIRA version 6.1):

GET /rest/api/2/statuscategory
GET /rest/api/2/statuscategory/{idOrKey}

 

More information can be found here.

I don't think these are exposed in the Java REST client, though - you can invoke them using an arbitrary REST client.

MarkRx June 27, 2016

Yes. Our environment is based on 7.x. However those endpoints are not available in the java rest client library.

Petar Petrov (Appfire)
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.
June 27, 2016

No, they aren't - just use an arbitrary client like Apache's httpclient or Rest-assured.

MarkRx June 27, 2016

Ok I will look in to that. Thanks

Petar Petrov (Appfire)
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.
June 27, 2016

There is also an open pull request by Jamie Echlin so you may want to watch that as well: https://bitbucket.org/atlassian/jira-rest-java-client/pull-requests/34/add-status-category/diff.

Like Junio Fernandes likes this
Junio Fernandes July 1, 2019

Yeah! There's an open pull request since 2016!!! How often are those pull requests analysed? I made my self implementation over master to gather this functionality.

TAGS
AUG Leaders

Atlassian Community Events