【问题标题】:Trigger pipeline with HTTP Request or fromo Power Automate flow使用 HTTP 请求或 fromo Power Automate 流触发管道
【发布时间】:2021-07-30 15:38:33
【问题描述】:

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

类似于如何从 HTTP 请求触发 Power Automate 流。

【问题讨论】:

    标签: azure-devops azure-pipelines power-automate


    【解决方案1】:

    是的,您可以使用Run API endpoint

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

    如果您想在主分支上触发构建,请使用此 json 作为主体

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-01-16
      • 1970-01-01
      • 2021-07-20
      • 2020-09-05
      • 2022-08-19
      • 2022-07-21
      • 2016-11-22
      • 1970-01-01
      相关资源
      最近更新 更多