GET completed task within the last day

Hey guys.

I’m trying to figure it out how to get the completed tasks within the last day. No luck so far :frowning:

Is it even possible ? Thank you in advance.

Hey @adrian_blanaru,

There are two approaches to achieve this. If you have a paid Asana account, you can use the premium /search endpoint to do server-side filtering of tasks. It works similar to advanced search in the Asana web product.

Here’s a CURL example using /search:

curl -H “Authorization: Bearer <token>” “https://app.asana.com/api/1.0/workspaces/32894/tasks/search?completed=true&amp;assignee.any=me,other@example.com&amp;custom_fields.8832.is_set=true&amp;created_on.after=2018-07-15&amp;opt_fields=name,assignee.email,completed&amp;limit=3”

If you’re using free Asana, you will need to use the completed_since query parameter. This param can be used to either return tasks that are incomplete (e.g. completed_since=now) or tasks that have been completed since a specified time (e.g. completed_since=2012-02-22T02:06:58.158Z).

Good luck and happy coding!

2 Likes

Hey @Jeff_Schneider,

Thank you for your answer…I do have a paid accound…I’m wondering how this would look in python ? And why there’s so less info regarding python ?

Thanks

Thanks

Hey @adrian_blanaru, we have client libraries in a variety of languages including in python.

Hi @adrian_blanaru, I don’t think it’s asasa’s job to document how to call their api in python, or in any language… it’s the job of the developer to know how to call any api, like I did by following these samples:

https://docs.python.org/2/library/httplib.html#examples

@Jeff_Schneider & @Frederic_Malenfant thank you guys… I’m not saying it’s asana’s job to document how u call your api in python or ruby or any other language…I was just wondering why there’s only 55 threads on Human verification - Stack Overflow … some of the GitHub - Asana/python-asana: Official Python client library for the Asana API v1 are so old and useless… maybe few separated topics on the forum like python regarding questions…ruby…and so on… Thanks and greetings from Germany