Is it possible to add child rows to multiple parent rows with a single API call?

I am attempting automate adding standard sub/child tasks to many parent tasks at the same time.

Following the API documentation Specify-Row-Location I am using the parentID + toBottom location attributes for every child row. I am consistently getting errorCode 1123 when the program moves from the first parent row to the next parent row (parentID value changes).

When reviewing the documentation, my assumption was that as long as the location attributes used in the new row call were the same, the value of those attributes (parentID value) could be different.

Am I misunderstanding something in the documentation? Is it possible to add child rows to many parent rows in a single API call?

Here is the snippet of code that is building to new rows:

for pid, parent_id in added_row_id.items():
for subtask_name, subtask_info in sub_task_bl.items():
duration_val = subtask_info['duration']

# Create a new Row() for the subtask
subtask_row = smartsheet.models.Row()
subtask_row.parent_id = parent_id
subtask_row.to_bottom = True


subtask_row.cells.append({
'column_id': pjt_sap_col_id[PjtSAPCols.TASK.value],
'value': subtask_name,
'strict': False
})

subtask_row.cells.append({
'column_id': pjt_sap_col_id[PjtSAPCols.DURATION.value],
'value': duration_val,
'strict': False
})

child_rows_to_add.append(subtask_row)

Best Answer

Answers