Run Pipeline Rest API - execute with branch name In our project, we are triggering pipeline through Runs REST API, following the steps mentioned in this page - https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/runs/run%20pipeline?view=azure-devops-rest-6.0 . Now, we created the pipelines in feature branch and tried to invoke using the above API, we are getting below exception.
{
"$id": "1",
"innerException": null,
"message": "An error occurred while loading the YAML build pipeline. File /delete.yml not found in repository https://dev.azure.com/{}/{}/_git/{} branch refs/heads/master version 201d2723d992a6ce0575838046970367098296a.",
"typeName": "Microsoft.Azure.Pipelines.WebApi.PipelineValidationException, Microsoft.Azure.Pipelines.WebApi",
"typeKey": "PipelineValidationException",
"errorCode": 0,
"eventId": 3000
}
When we add the pipeline yml file in master branch, we are able to trigger it using the API. But if we should not use the master branch, and use a different branch, how we can pass the branch parameter in this API call?