I am a bit stuck about filtering task api by the due_on
date. So the query I am using just like below. And Trying to return task that between dates…
11578316/tasks?completed=true&opt_fields=gid,due_on,assignee,assignee.name,completed,completed_at,due_on,modified_at&due_on.after=2020-02-20&due_on.before=2020-02-25
But it still returns all tasks. No error or else… Is there anything that I missed in the query.
I suppose that “…11578316” is your project ID?
If you use that endpoint (/projects/11578316/tasks), the only filters available are completed_since and modified_since.
https://developers.asana.com/docs/#get-multiple-tasks
I think what you try to do is use another endpoint, /search.
https://developers.asana.com/docs/#search-tasks-in-a-workspace
Your querystring looks good for filtering, but the url is not. It should looks like:
GET /workspaces/xxx/tasks/search
In that case, …11578316 should be your workspace_id
1 Like