API to fetch embedded attachments and comments in task

I need api to fetch the embedded comments and attachments of a task. Currently i can fetch only the comments not the attachments. seems to be data loss while fetching stories via API.
Please provide a way to fetch both attachments and comments in a single api.

3 Likes

I also need to ba able to access the comments of a task

Any update on this?

What’s the “this” you’re asking about? I ask because the above posts are confusing in that they’re referring to 3 different requests in my reading of them.

  1. The OP says they can’t access attachments on a task; that should be possible via this endpoint: https://developers.asana.com/docs/get-attachments-for-a-task

  2. The OP also seems to be asking for the ability to get attachments and comments (i.e. stories) in one API call - I’m sure that won’t ever happen because those are addressing two separate Asana objects - tasks and stories.

  3. Then there is a post really unrelated to the OP’s requests about accessing the comments of a task, which is done via this endpoint: Get stories from a task

So given all of that, what are you asking about? :slight_smile:

Here are two of my concerns:

  1. I am unable to delete a project duplicated from another “template project” via API. I am able to delete a newly created project (without duplicating)
    here’s the response :

  2. I want to get the attachment uploaded on a comment. But in comment API, I get only the text. I won’t mind using attachment API but even that API doesn’t give any information which can tell if this attachment belongs to a comment

Hi @Avinash1,

I’m not an Asana employee, just a volunteer here in the forum, and am not available for a Skype.

Please post a new separate topic for this issue, as it’s not related to the subject of this topic. Thanks!

In the API view of things, attachments get attached to tasks, not stories (i.e. comments). And while in the UI you can indeed see the attachment on the comment, in the API there’s no way to retrieve this association; the only association available is between task and attachment.

@Ross_Grambo , do you know why this is so - why we can see in the UI the attachment on the comment but in the API there’s no linkage available between attachment and story?

Anyone found a solution to link attachment with its relevant comment instead of task