我在尝试在Azure Devops中克隆管道时遇到授权问题

时间:2020-07-02 19:12:28

标签: azure api azure-devops authorization azure-pipelines

我拥有正确的授权,我可以手动克隆管道,但是当我尝试使用邮递员进行操作时,会收到以下响应:

{
    "$id": "1",
    "innerException": null,
    "message": "You are not authorized to access this API. Please contact your project administrator",
    "typeName": "System.UnauthorizedAccessException, mscorlib",
    "typeKey": "UnauthorizedAccessException",
    "errorCode": 0,
    "eventId": 0
}

我正在使用以下网址:GET https:// {instance} / {collection} / {project} / _apis / test / cloneoperation / {cloneOperationId}?api-version = 5.0-preview.2

请帮助。

1 个答案:

答案 0 :(得分:0)

_apis / test / cloneoperation / xxx不用于克隆管道,它用于获取测试计划/套件的克隆信息。

要克隆管道,您可以get a build definition,然后进行更新并create a new build definition