【发布时间】:2015-09-24 14:00:04
【问题描述】:
如何使用 REST API 在 Visual Studio Online 项目中创建新的工作项。这是我的期望,如here 所述
$task = @{"op"="test task";"path"="/rev";"value"=1}
$json = $task | ConvertTo-Json
$response = Invoke-RestMethod -Uri $apihref/wit/workitems/$Task?api-version=1.0 -Body $json -headers $h -Method PATCH
但它会产生错误:Invoke-RestMethod : The remote server returned an error: (404) Not Found.
【问题讨论】:
-
您的 URI 中有哈希
$task,这看起来不正确。 uri 应该是一个字符串
标签: rest powershell azure-devops