macabi
macabi

Reputation: 37

Trigger pipeline with HTTP Request or fromo Power Automate flow

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

Answers (1)

Krzysztof Madej
Krzysztof Madej

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

Related Questions