0

I am able to create a sub-task using the API but the sub-tasks show up on the calendar like tasks. But when using the ASANA front end, this does not happen. It seems that this happens when API is used to create a sub-task.

I am successfully able to create a task first and use the TaskID to create several sub-tasks for the task using API. Is there anything I can do so the sub-tasks created via API behave the same way on the calendar as if they were created using the ASANA application?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

1 Answers1

0

Could you provide a curl command for how you are creating subtasks using the API? You are likely explicitly adding the subtask to your project, which will cause it to look like a task in the calendar.

You should get your desired result if you create the subtask by posting to /tasks/task-id/subtasks

Here is an example curl command that creates a subtask that will behave like it was created in the web app:

curl --request POST -H "Authorization: Bearer 0/123456789" \
https://app.asana.com/api/1.0/tasks/<task-id>/subtasks \
-d "name"="subtask name" \
-d "due_on"="2017-03-08" \
-d "assignee"="<assignee-id>"
Jeff
  • 456
  • 2
  • 5
  • Yup, I am posting the subtask as you suggest. I am also passing the project ID. What I think I need to do is to remove the projectID from my JSON request and try that to see if that fixes. Thank you for your suggestion. – Vivek Patel Mar 06 '17 at 15:18