I'd like to know if the Google Tasks API provides the option to move a task to a different list or if I need to create a copy of the task.
The move method seems to only allow moving within the same list.
The tasks API does not support moving tasks from one list to another, just changing a tasks parent task or moving it to the top of the list.
You can however get the task with /lists/tasklist_id/tasks/task_id
, check each of its fields and set populate the same fields with a different tasklist_id using /lists/new_tasklist_id/tasks
and then delete the old one with /lists/tasklist_id/tasks/task_id
Google also provides the Tasks API explorer which should help you experiment.
Just to confirm the answer by Thai Wood:
This is definitely the way to do it. I also moved a task using the website and and noticed that the task id changes, therefore the google website also seems to do a delete followed by a insert.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With