Hi, I’m using the API to duplicate another task, then I want to move it to another project, by first adding it to the new project, then removing it from the project I duplicated it from. I do this in the Mac client all the time, but getting a 400 “task: Not the correct type” error from add_project_for_task…
{‘data’: {‘project’: ‘8186841131256’}}
try:
api_response = tasks_api_instance.add_project_for_task(body, newtaskid)
print(api_response)
except Exception as e:
print(“Exception when calling TasksApi->add_project_for_task: %s\n” % e)
This gives me the following error:
Exception when calling TasksApi->add_project_for_task: (400)
Reason: Bad Request
…
HTTP response body: b’{“errors”:[{“message”:“task: Not the correct type”,“help”:“For more information on API status codes and how to handle them, read the docs on errors: Errors”}]}’
I confirmed the duplicated task is of type “default_task”, so not sure what type it’s looking for.
Thanks,
Jim