Forum Discussion
Query activity runs REST API
Hi everyone,
I'm currently using the following endpoint to monitor activity runs from an external app:
POST https://api.fabric.microsoft.com/v1/workspaces/<your WS Id>/datapipelines/pipelineruns/<job id>/queryactivityruns
Everything works fine when querying top-level activities. However, I've noticed an issue when one of the activities is still in progress and has child activities.
From the Fabric portal, I can see the output.pipelineRunId for the parent activity, and I'm able to track which child activities are completed and which are still running.
But when I query the same activity via the API, the output.id field is null, so I can't retrieve the child activity runs programmatically.
Has anyone run into this limitation? Is this a known gap in the API, or is there a workaround to access child activity statuses while the parent is still in progress?
Thanks in advance!
Hi Elagunas
This is a current gap in the public API. queryactivityruns doesn’t populate output for in-progress activities (e.g., Invoke/Execute Pipeline), so the child pipelineRunId is null until the parent activity finishes. The portal shows it via internal telemetry that the API doesn’t expose mid-run.
(1) Poll until the parent completes, then call query activity runs again;
(2) Have the child pipeline log/send its @pipeline().RunId at start (to KQL/SQL/Lakehouse/webhook) for live tracking.
https://learn.microsoft.com/en-us/fabric/data-factory/pipeline-rest-api-capabilities
1 Reply
- rohit1991Super User
Hi Elagunas
This is a current gap in the public API. queryactivityruns doesn’t populate output for in-progress activities (e.g., Invoke/Execute Pipeline), so the child pipelineRunId is null until the parent activity finishes. The portal shows it via internal telemetry that the API doesn’t expose mid-run.
(1) Poll until the parent completes, then call query activity runs again;
(2) Have the child pipeline log/send its @pipeline().RunId at start (to KQL/SQL/Lakehouse/webhook) for live tracking.
https://learn.microsoft.com/en-us/fabric/data-factory/pipeline-rest-api-capabilities