Get Last Attachment By API

Chiara Spadavecchia February 18, 2021

How can I get the last uploaded attachment by API call?

I don't understand the sorting of the attachments list using:

../rest/api/2/issue/FWT-307?fields=attachment

1 answer

0 votes
mogavenasan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2021

Hi @Chiara Spadavecchia,

You will need to get the result and then perform sorting by yourself. The REST API call will return the created date:
Screenshot 2021-02-18 at 5.05.07 PM.png

I hope that this helps.

Thanks,
Moga

Chiara Spadavecchia February 18, 2021

ok but do you know the sorting used by API call?

mogavenasan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 18, 2021

From the result I got, I would say from oldest to newest. But then again, it's not documented in Get issue

Suggest an answer

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

Atlassian Community Events