How to get attachment details in all issues by rest api

Hi Experts,

I am getting all issues details by below rest api but not getting attachment details which is associate with the issue. How to expend attachment details in the same jql?

REST API get all issues :
http://localhost:8080/rest/api/2/search?jql=project=HPAL

Add &fields=attachment to the end of the query to expand the Attachment field.

1 Like

Thank @sfbehnke!
But if I add this “/rest/api/2/search?jql=project=UCOP&fields=attachment” then it is showing only attachments info. I want issue details with attachment.

My old rest api “http://localhost:8080/rest/api/2/search?jql=project=HPAL” is giving me all the issue details except attachment.

If you want all then add fields=*all or fields=all, I forget.

https://developer.atlassian.com/cloud/jira/platform/rest#api-api-2-search-get

@sfbehnke

Kindly add attachment information in my JQL String. Below JQL String is working fine I just want to add attachment information in response JSON.

/rest/api/2/search?jql=project%20%3D%20DS%20AND%20issuetype%20%3D%20%27Defect%27%20&startAt=0&maxResults=2