We are using the below search API to get all the issues from Jira service desk along with attachment details and we got the attachment url from the API response.
"https://api.atlassian.com/ex/jira/{Cloud_Id}/rest/api/2/search?fields=status,attachment,reporter"
When we pasted the attachment url which we got from the API response in browser we were not able to download it and got the 404 Not found error.
Attachment URL look like this -
"https://api.atlassian.com/ex/jira/{Cloud_Id}/secure/attachment/{attachment_Id}/test.png"