need help here: I have this api which i run in Postman (https://dev.azure.com/abc/Abc/_apis/build/builds/24169/workitems?api-version=4.1), I get result as
{
"count": 50,
"value": [
{
"id": "21610",
"url": "https://dev.azure.com/abc/_apis/wit/workItems/21610"
},
{
"id": "21606",
"url": "https://dev.azure.com/abc/_apis/wit/workItems/21606"
}]}
I need to call this in Powershell, and get a list of all IDs. I am doing this way but I am not getting anything..what wrong am I doing?
Function GET-RELEASEWIT {
$AzureDevOpsPAT ='psgklxbjircg5g5fda'
$AzureDevOpsAuthenicationHeader = @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$($AzureDevOpsPAT)")) }
$uriAcc = "https://dev.azure.com/abc/ABC/_apis/build/builds/24169/workitems?api-version=4.1"
write-host $uriAcc
$responseRelW = Invoke-RestMethod -Uri $uriAcc -Method get -Headers $AzureDevOpsAuthenicationHeader
write-host $responseRelW
$BID = @()
$BID += $responseRelW.value.id
write-host "********START****************"
write-host $BID
}