Error while get all task from the specified project


#1

I am using below link to get all tasks under that specific projects.

https://app.asana.com/api/1.0/tasks?opt_fields=id,created_at,modified_at,name,notes,assignee.id,assignee.name,completed,assignee_status,completed_at,due_on,due_at,projects.id,projects.name,memberships,tags,workspace.id,workspace.name,num_hearts,parent,hearts,followers.id,followers.name,hearted&completed_at=2018-05-05T22:54:00.867Z&project=[projectID]&workspace=[workspaceID]

While using this link. I am getting error as below-
{“errors”:
[{“message”:“Must specify exactly one of project, tag, or assignee + workspace”,“help”:“For more information on API status codes and how to handle them, read the docs on errors: https://asana.com/developers/documentation/getting-started/errors”}]
}

Help me to resolve this error.


#2

You need to use this endpoint to get the tasks that belong to a specific project GET /projects/:projectId/tasks.

More info for query tasks: