Open link in a new tab

Content

Expand project menu

Create a Work with Activities

Hi,
i’m working in a migration script from another system to Open Project via API & PHP.

I could create Works, and if i SPECIFY the Work ID i could also create activities but….

If i work with a script that insert a lot of works and in each of them has to insert some activities i don’t know how to to… when i insert a new Work i don’t know what will be his ID so i can’t specify the ID into the activities…

How can i create a work with some activities?
How can i retrieve the last work inserted?

Thanks