Reputation: 25
We are trying to download attachments using the Asana REST API. For attachments in Google Drive and Dropbox the view_url property gives a permanent, non-expiring link, but for attachments in Asana itself (which uses Amazon S3) this is not the case. For S3 the view_url looks like this: https://s3.amazonaws.com:443/prod_object_assets/assets/19422864231098/Time_travelling_-_How_does_the_world_look_like_in_10_years.docx?AWSAccessKeyId=AKIAI7NUHQYARXR2GGCQ&Expires=1415262240&Signature=TCpmP6kKbxl5YQQ554P0MlMw6%2BY%3D#=
Notice the "Expires" section in the link. We would very much like to have a permanent link to attachments in S3, is this possible with the Asana REST API?
When reading the API documentation it seems like this should be possible: https://asana.com/developers/api-reference/attachments. There's a distinction between download_url and view_url, where it is clearly stated that the download_url may only be valid for one hour. But for view_url there is no such warning, indicating that view_url is a permanent, non-expiring link. But this is not consistent with what we see when using the API (we use the /attachments/attachment-id endpoint).
Does anyone know if this is a bug, or is the documentation incorrect?
Upvotes: 1
Views: 704
Reputation: 3784
I think the documentation is incomplete - you're right we should call out that both view_url and download_url should be treated as temporary.
If you want a permanent url, use permanent_url
.
Upvotes: 1