Hi Dmitry Kuharev Thank you for reaching out to Microsoft Q&A.
You can use this old batch Api to bulk update work items.
Refer here: https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/workitembatchupdate?view=azure-devops-rest-7.0
Working example is referenced here: https://www.briankohrs.com/posts/azdo-rest-api-batch-requests/
You cannot patch multiple work item issues with https://dev.azure.com/{ORG}/_apis/wit/workitems/{Id}?api-version=7.1
You will have to call the patch api in loop for each work item separately with the help of code.
Looping multiple work items with powershell
$Org = "<ORG>"
$Pat = "<PAT>"
$Project = "<Project>"
$Ids = @(101, 102, 103) # Work item IDs
$authHeader = "Basic " + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$Pat"))
foreach ($id in $Ids) {
$uri = "https://dev.azure.com/$Org/$Project/_apis/wit/workitems/$id?api-version=7.1"
$body = @(
@{ op = "add"; path = "/fields/System.State"; value = "Resolved" },
@{ op = "add"; path = "/fields/System.AssignedTo"; value = "******@xxx.com" }
) | ConvertTo-Json -Depth 5
Invoke-RestMethod -Uri $uri -Method Patch -Headers @{ Authorization = $authHeader; "Content-Type" = "application/json-patch+json" } -Body $body
Write-Host "Updated work item $id"
}