Check if Project Creation is Done

Hi,
I am instantiating a project from a template and then I change some tasks names depending on some data. But for that I have to wait not only until the project is created but also until all tasks are created. Currently I hardcoded the number of tasks of the template and compare the current number of tasks in the project with that. But this is not optimal since I have to change my code when I add a task to the template. Is there a way to get the number of tasks from a template using the API? Or maybe to check if the project creation is fully done ?
Best,
Noah

Hi,

Apologies, I haven’t used this endpoint, but I thought instantiate project from a template was returning a “job” id which you can then use with this endpoint to check its status.

1 Like

Hi @Noah_Farr,

@John_Baldo is 100% correct here. Grab the Job ID that is returned by the project instantiation call, then perform a loop (I do it every 10 seconds) which checks the status of that Job ID. Loop until you get a status returned of “succeeded” which tells you the project creation is finished.

thanks, i got it working with your help

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.