API call for single task returns all taks for a workspace

Dear all,

I try to get the data for a single task, but a call to https://app.asana.com/api/1.0/tasks?1111&workspace=2222&assignee=3333@4444.com&opt_fields=name,gid,due_on,completed,start_on,modified_at,memberships.section.name
seems to return an array with all tasks in workspace ‘2222’.

Could somebody tell me what I am doing wrong?

Thanks for your help!

Marc

Hi,

Did you follow https://developers.asana.com/docs/get-a-task ? Your URL is not build correctly, the id should not be after the “?”
curl -X GET https://app.asana.com/api/1.0/tasks/{task_gid}

2 Likes

Dear Bastien,

shame on me! Thanks for your sharp eye. Changed the ? to a / and the first & to a ?.
Works!

Thanks very much,

Marc

1 Like