Azure devops 更新拉取请求azure devOps的审阅者时获取异常

Azure devops 更新拉取请求azure devOps的审阅者时获取异常,azure-devops,azure-devops-rest-api,Azure Devops,Azure Devops Rest Api,我在ADO中有一个活动的pull请求,希望使用下面描述的API进行更新: 到目前为止,我可以成功地更新Pull请求的标题 { "title": "Foo" } 我现在想更新审阅者,以下是我正在修补的请求: { "reviewers": [ { "id": "myValidGuid" } ] } 但是,我返回了以下400个错误: { "$id": "1", "innerException": null, "message": "Invali

我在ADO中有一个活动的pull请求,希望使用下面描述的API进行更新:

到目前为止,我可以成功地更新Pull请求的标题

{
    "title": "Foo"
}
我现在想更新审阅者,以下是我正在修补的请求:

{
    "reviewers": [
    {
      "id": "myValidGuid"
    }

   ]
}
但是,我返回了以下400个错误:

{
"$id": "1",
"innerException": null,
"message": "Invalid argument value.\r\nParameter name: You can only update reviewers, descriptions, titles, merge status, and status.",
"typeName": "Microsoft.TeamFoundation.SourceControl.WebServer.InvalidArgumentValueException, Microsoft.TeamFoundation.SourceControl.WebServer",
"typeKey": "InvalidArgumentValueException",
"errorCode": 0,
"eventId": 0
}

我看不出我的请求有什么问题?

根据您提供的链接,看起来您使用的是“拉请求API”,但实际上您应该使用该API

根据文档,reviewerID实际上位于URI参数中:

PUT https://dev.azure.com/fabrikam/_apis/git/repositories/3411ebc1-d5aa-464f-9615-0b527bc66719/pullRequests/22/reviewers/{reviewerId}?api-version=5.0