使用 HTTP 请求或 fromo Power Automate 流程触发管道

Trigger pipeline with HTTP Request or fromo Power Automate flow

有没有办法通过使用类似于 POST 调用或从 Power Automate 流程内部触发 Azure 管道?

类似于从 HTTP 请求触发 Power Automate 流的方式。

是的,你可以使用 Run API endpoint

POST https://dev.azure.com/{organization}/{project}/_apis/pipelines/{pipelineId}/runs?api-version=6.0-preview.1

作为 body 如果你想在主分支上触发构建使用这个 json

{
    "resources": {
        "repositories": {
            "self": {
                "refName": "refs/heads/main"
            }
        }
    }
}

如果您不知道如何验证此文档,请向您解释如何使用 PAT token