I want to access an Issue data via a java program using REST API of JIRA

Srini September 19, 2016
 

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 19, 2016

That can be done - REST can be used by any language that supports doing the calls.  Could you explain what you are asking?

Srini September 19, 2016

Say, I have an issue "XYZ1" , the API call gives me a JSON Response(lots of unnecessary fields), which I want to store a few fields like Status,Assignee,Reporter,etc. in my database (say Oracle/MongoDB).

I am facing difficulty in :

  1. getting JSON from the api call in the development environment(using eclipse)
  2. Parsing the response, to store objects of my interest.

Can you guide me how to go about this?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 19, 2016

That's not really a JIRA question - you're getting the issue data from the API call - what you do with it is up to your code. 

On your difficulties

  1. What is your dev environment doing differently to the calls that have worked and returned your issue data
  2. I'd look for a JSON parsing library for java, and a database library for talking to your chosen data store
  3. You mention (lots of fields) - have a look at https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-query-issues to see how to reduce the results to just the fields you want

Suggest an answer

Log in or Sign up to answer