How to retrieve all activities in main and sub process

Hi,
I’m trying to implement a KPI that maintains according to the following video

But, I have some call activities in my process that call some other BPMNs. However, after the implementation, I tried to retrieve the intermediate throw events by “/engine-rest/history/activity-instance”. But didn’t find a way to retrieve all activities including main flow and flows called by call activities for a particular Job (Like Business key or rootProcessInstanceId).

Is there any other way to achieve this?

Thanks in advance.