when I would like to expand the relations / any of the expand options in Azure DevOps ‘Get WorkItem’ api call, see documentation
https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/work-items/get-work-item?view=azure-devops-rest-7.1&tabs=HTTP#workitemexpand
I can’t get any usable results, instead I get a warning, that the value of the expand parameter is not valid.
When I send my call:
$workItem = Invoke-VSTeamRequest -Url "https://dev.azure.com/{org}/{project}/_apis/wit/workitems/{id}?api-version=7.1-preview.3&$expand=relations"
I get the error message:
“Message”: “The value u0027relationsu0027 is not valid for Nullableu00601.rn”
When I use
$workItem = Invoke-VSTeamRequest -Url "https://dev.azure.com/{org}/{project}/_apis/wit/workitems/{id}?api-version=7.1-preview.3&expand=relations"
(without the preceding $), the parameter is ignored and I miss the required ‘relations’ array.
Changing the api version has no effect.
Sorry, but I really have a knot in my brain actually. 🙁
Any help would be appreciated.
user26526222 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.