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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Search API with JQL is not returning the attachments

Edited

Hi 

I am trying to retrieve the issues those are returned by JQL using search API,

https://intelligenceapp.atlassian.net/rest/api/2/search 

Method : Post

Post data: 

{
    "jql":"project = 'xxx' and issuetype='xx'
}

however that returns all the fields except the attachment field.

But I am able to view the attachment 
https://intelligenceapp.atlassian.net/rest/api/2/issue/{{key }} API.

Could anyone tell me what's wrong with this.

Note: I have added the Attachment fields in Field configuration and screen as well

1 answer

1 accepted

1 vote
Answer accepted
Hannes Obweger - JXL for Jira
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Sep 29, 2023

If I remember correctly you need to explicitly specify the fields for this to work. Try adding

fields=attachment

to your request.

Best,

Hannes

yes, that works for me but since I am getting JQL result as a response I wanted to get the attachment for all the issues the API returns.

To acheive that currently I am looping the response and requesting the retrieve issue API by specifying the fields=attachment the params which is time consuming.

It would be better if I can get the attachment while requesting the below API

https://intelligenceapp.atlassian.net/rest/api/2/search 

Method : Post

Post data: 

{
    "jql":"project = 'xxx' and issuetype='xx'
}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events