Feature/api work package embedded activities

Reapplying commits from #1528 (with a few corrections)