I am using Asana REST API for connecting Asana tasks with our app. I would need to query for a task from our app, but I don't know in which project to search for that task. Is there a way to query for all tasks in a specific workspace?
As I can see from the documentation it is only possible to search in a specific project: https://asana.com/developers/api-reference/tasks#query
If you need users to search for a task by name in your app, you should use Asana's typeahead search API. It provides search for objects from a single workspace. This endpoint should be used to query for objects when creating an auto-completion search feature. This API is meant to provide results quickly and should not be relied upon for accurate or exhaustive search results.
There is no single query to return all tasks in a workspace. As workplaces have many thousands of tasks, this query would be too broad (and too expensive).