It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

how to fetch attachment details of issue from jira using rest api

Hi,

currently I'm working in a project say 'xxx' and has a fixVersion say 'yyy' and cyclename say 'Zzz' 

i wrote query to search for all the issue in that cycle and want to check whether all issue has attachment file present in it.

only some issue is returning attachment file in json file even though all issue is properly attached with files.

please help me with this problem

2 answers

0 votes
Charlie Misonne Community Leader Sep 17, 2018

Hi @Ramji

What I understand from your question:

Based on a JQL query you want to retrieve attachment details from all issues in that query. Your problem is that not all returned issues have attachment details in the json. Is that correct?

Can you post you jql query and REST call here?

 

Make sure you check the REST API documentation: https://docs.atlassian.com/software/jira/docs/api/REST/7.12.0/#api/2/issue-getIssue

Hi @Charlie Misonne

 

Yes that's the question

here is my jql query:

htttp://<URL>/jira/rest/api/2/serach?zql=project = <projectName> AND fixVersion = <fixversion> AND cycleName = <cycleName>

Thank you.

Charlie Misonne Community Leader Sep 18, 2018

try adding this to the end of your url: &fields=attachment

Hi @Charlie Misonne

 

I tried fields but its not working, Also i tried 

htttp://<URL>/jira/rest/api/2/issue/{issueid} url on two different issues from same cycle, 

one of the issue is fetching attachments while other is not but both the issue has file attached to it respectively.

 

Thank you.

Hi Ramji @Ramji,

I am also facing the same issue: I tried:

htttp://<URL>/jira/rest/api/2/issue/{issueid} url on two different issues from same cycle, 

one of the issue is fetching attachments while other is not but both the issue has file attached to it respectively.

Is there any solutions or findings on this?

 

Thanks

Siva Kalidasan

Fields & expand should be a List

 &fields=[attachment]

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

344 views 1 3
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you