How to retrieve both debug and triggered pipeline run details for ADF using a single REST API call using ADF web activity

Kumar 20 Reputation points
2024-06-10T08:51:06.91+00:00

How can I obtain the latest run date of a pipeline (both Triggered and Debug run details) utilizing just the pipeline name?

The first URL retrieves the triggered pipeline details with the ADF web activity, and the second URL retrieves the debug pipeline details. However, I want to combine both the triggered and debug pipeline runs' output. Please let me know if this is possible and how to accomplish it if it is feasible.

  1. https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryPipelineRuns?api-version=2018-06-01
  2. https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryDebugPipelineRuns?api-version=2018-06-01
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 33,071 Reputation points Volunteer Moderator
    2024-06-11T08:30:15.0766667+00:00

    To retrieve both debug and triggered pipeline run details for an Azure Data Factory (ADF) pipeline using a single REST API call is not directly supported. However, you can achieve this by using an ADF web activity to make two separate API calls and then merge the results within your data factory workflow.

    Use the following URL in your web activity to retrieve triggered pipeline run details.

    
    https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryPipelineRuns?api-version=2018-06-01
    
    
    

    Use the following URL in another web activity to retrieve debug pipeline run details.

    
    https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataFactory/factories/{factoryName}/queryDebugPipelineRuns?api-version=2018-06-01
    
    

    After each web activity, use a Set Variable activity to store the results of the triggered and debug pipeline runs separately.

    You can use an Azure Function or a custom activity to merge the results from the two variables. The function will take the two sets of results and combine them into a single output.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.