Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get issue attachment image?

Nageswara Rao Koppisetti
Contributor
March 22, 2018

Hi All,

I am pulling the issue related data as  below rest api.

/rest/api/2/issue/10095 by passing issue id.

and consuming the rest api in java and parsing and storing into custom table.getting as below details attachment related info.

SONArray items = fieldsJson.getJSONArray("attachment");
for (int i = 0; i < items.length(); i++) {
JSONObject actualObj = items.getJSONObject(i);
String attachmentId = actualObj.getString("filename");
String attachmentFileName=actualObj.getString("filename");
JSONObject attachmentAuthor = actualObj.getJSONObject("author");
String attachmentAuthorName=(String)attachmentAuthor.getString("name");

Could you please  help me how to get the attachment which is attached to issue  as like filename and author and how to parse the attachment using java.

 

 

 

 

0 answers

Suggest an answer

Log in or Sign up to answer