Stories Membership API

Hi!

I’m trying to find a task membership as an optional field to include in the https://app.asana.com/api/1.0/tasks/{task_gid}/stories endpoint. Seems like there isn’t anything similar to memberships on tasks (https://app.asana.com/api/1.0/projects/{project_gid}/tasks).

Has anyone had any luck finding the field for task membership of a story?

Thanks,
Thomas

FYI - tried using the task object but that doesn’t return anything

Hi @Thomas_W1,

There is no memberships property on a story; it wouldn’t make any sense to have one.

A membership property on a task identifies a project and a section that the task is in.

A story’s “parent” object is a task; the story is attached to the task. There’s no direct relationship between a story and a project/section; the story just shows up wherever its task shows up.

Does that make sense?

Hi @Phil_Seeman - thanks for helping out!

I already checked the task object but it doesn’t return anything. You can see it in python below (happy to send from the Asana API docs GUI as well - same result)

What is it that you’re trying to accomplish? It looks like you’re trying to retrieve the “parent” task object from a task’s stories? But if so, I would probably just do an API call on the task object itself to get whatever info you need from it. Or are you trying to achieve something else?

Hi @Phil_Seeman - I looping over a number of tasks and would like the ID of the given tasks to be in the output of the story endpoint. Otherwise I can tie (join) tasks and stories together.

Gotcha.

I just tried it in Postman and it does seem to be odd; I got the task info for the first story only, but not any subsequent ones. I’m going to pursue this oddity with my contacts at Asana, will let you know what I find out.

Thank you @Phil_Seeman!

1 Like

@Thomas_W1 I heard from my Asana contacts: try using opt_fields=parent_task.name instead. I just tried it and it worked for me!

You’re a star @Phil_Seeman! Works exactly as intended. Thanks for your effort!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.