SubTask API

SubTask API

My goal is to use the API and return all tasks & sub-tasks for a particular project.  I notice the method 'All Tasks For Project' does not return sub-tasks.  So I try the method 'All Task Lists' for a particular project.  From there, I can use 'Task for Tasklist' method.  I think that method returns all tasks & sub-tasks.  But the next problem is that I do not know how many tasks lists each project contains.  The method 'All Task Lists' will fail since I do not know the count of tasks lists.  I must include index & range in the GET.  Project API gives details for bug, tasks, and milestone counts.  But no data on tasks lists.

Please suggest a solution to for my goal:  obtain all tasks and sub-tasks for a particular project.  A multi-step solution is no problem.  I would like some guidance.  Please and thank you.