Need help downloading attachments via REST API


#1

Hello, I’m attempting to download attachments from the REST API; however, download_url in the REST response for the asset is not an API location.

Rather than being something like:

https://app.asana.com/api/1.0/asset/asset_id, it’s
https://app.asana.com/app/asana/-/get_asset?asset_id=#############

So, it doesn’t use the API KEY for authentication, and thus I can’t download it from within my API client. Is there any way to get an API KEY authenticated download URL or the direct URL to AWS (or to wherever the actual file resides)?

Thanks,

Jim


#2

Hey, check permanent_url.

More info: https://stackoverflow.com/questions/26774908/permanent-view-url-to-uploaded-attachments


#3

Nice, thanks! I’ll check it out. What threw me for a loop was that permanent_url is not document, and more importantly, not included in the organizational exports (see example below).

{"__object_id":#############,"__type":“Asset”,"__creation_time":“2018-07-10 20:52:47”,“name”:“a.gif”,“download_url”:“https://app.asana.com/app/asana/-/get_asset?asset_id=#########”}