i want to retrieve pipeline details, including the repository and branch name, using an API call from Data Factory.

Parthkumar Pavra 0 Reputation points

I am trying to fetch pipeline data from Data Factory using an API call. I am able to retrieve the pipeline data, but I get data for all the pipelines in ADF. Now, I want to fetch the pipeline data by branch. I have checked almost all the APIs in the Azure REST API documentation but haven't found a way to do this. I would like to know if this is possible, and if so, could you guide me on how to achieve it?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,161 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 19,946 Reputation points

    You need to list the repositories in your Azure DevOps project to find the repository ID, using an API call :

    GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories?api-version=6.0

    After getting the repository ID, list the branches in that repository.

       GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}/refs?filter=heads/&api-version=6.0

    Then you list all pipelines in your Data Factory.

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

    Once you have the list of pipelines, you need to manually filter them based on the branch information retrieved from Azure DevOps. Unfortunately, ADF does not directly support filtering pipelines by branch, so this step requires additional logic in your code to match pipelines with the appropriate branch.

    0 comments No comments