I’m using asana search API to get the task list which are added to a project after a specific date.
This is what i’m using right now.
curl -H “Authorization: Bearer ” “https://app.asana.com/api/1.0/workspaces//tasks/search?projects.all=&created_on.after=2018-11-09&limit=100”
i’m using created_on filter which seems to be inaccurate as task may be created before but added to project sometimes later
1.How do i get the task list which filter on basis of addition to the project and not on the creation of the task?
- pagination doesn’t seems to be working in this request it gives 100 record but no offset value.
The correct Curl request is here
curl -H "Authorization: Bearer <token>" "https://app.asana.com/api/1.0/workspaces/<workspace-id>/tasks/search?projects.all=<project-id>&created_on.after=2018-11-09&limit=100"
There’s no field in the data model that stores the date/time on which a task was added to a project, so I don’t see that it will be possible to get that info from a search.
Pagination is not supported in the Search API - they explain that on the Search API documentation page:
Search results are not stable; repeating the same query multiple times may return the data in a different order, even if the data do not change. Because of this, the traditional pagination available elsewhere in the Asana API is not available here. However, you can paginate manually by sorting the search results by their creation time and then modifying each subsequent query to exclude data you have already seen. Page sizes are limited to a maximum of 100 items, and can be specified by the
limit query parameter.