Reputation: 37
Is there a way to trigger an Azure pipeline by using something similar to a POST call or from inside a Power Automate flow?
Similarly to how a Power Automate flow can be triggered from an HTTP Request.
Upvotes: 0
Views: 2821
Reputation: 40603
Yes you can use Run API endpoint
POST https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs?api-version=6.0-preview.1
as body if you want to trigger build on main branch use this json
{
"resources": {
"repositories": {
"self": {
"refName": "refs/heads/main"
}
}
}
}
And if you don't know how to authenticate this documentation explain you how to use PAT token
Upvotes: 1