API Get Task Subtasks
J
Jared Van Kirk
Currently, it appears that to read subtasks of a task, you need to use the Get Tasks or Get Filtered Team Tasks calls with the subtasks boolean set.
It would be helpful to be able to include an array of the subtask ids for a given single task from the /task/{id} call. For example:
{
"id": "9hx",
"name": "Updated Task Name",
...
"subtasks":["123", "456"]
}
Perhaps it could also be controlled via subtasks boolean param as the current Get Tasks and Get Filtered Team Tasks supports.
Log In
T
Tereza Klobouckova
Another workaroung is using the endpoint "Edit a Task" and pass no data except the task ID. This endpoint returns array with subtasks.
N
Ny Nguyen
After some fiddling, I was able to get it to grab subtasks of a parent by adding an extra "parent" query parameter with the task ID as the value. Of course, it'd be much nicer to be able to grab that value from Get Task instead of having to jump through hoops.
F
Flavio Rinaldi
Ny Nguyen: can you explain how you did it?
N
Ny Nguyen
Flavio Rinaldi: Here's an example query
Using this as the endpoint, you'll get a list of subtasks under the parent task provided.