I'm retrieving information from Azure Devops through a wiql query, using Pyspark on Azure Databricks, but when I do a get in Azure Devops Rest Api, the field "ParentWorkItemId" doesn't come out in the reponse of the request. What can I do to add this field in the results?
First a get a list of workItems ids and a url for each workitem. I do a second request on the url's and get the workitem information, but no matter what I do, I only get a certain amount of fields. I need the field "ParentWorkItemId" in the response. Is it possible to configure Devops to send me this information anyhow?
This is my request:
url = f'https://dev.azure.com/{devops_org}/{project_name}/_apis/wit/workitems/48331?api-version=6.0'
headers = {
'Authorization': f'Basic {base64.b64encode(devops_pat.encode("utf-8")).decode("utf-8")}'
}
response = requests.get(url=url,
headers=headers)
data = response.json()
data
These are the fields I get:
'System.AreaPath'
'System.TeamProject'
'System.IterationPath'
'System.WorkItemType'
'System.State'
'System.Reason'
'System.AssignedTo'
'System.CreatedDate'
'System.CreatedBy'
'System.ChangedDate'
'System.ChangedBy'
'System.CommentCount'
'System.Title'
'System.BoardColumn'
'System.BoardColumnDone'
'System.BoardLane'
'Microsoft.VSTS.Scheduling.StoryPoints'
'Microsoft.VSTS.Common.StateChangeDate'
'Microsoft.VSTS.Common.ActivatedDate'
'Microsoft.VSTS.Common.ActivatedBy'
'Microsoft.VSTS.Common.ClosedDate'
'Microsoft.VSTS.Common.ClosedBy'
'Microsoft.VSTS.Common.Priority'
'Microsoft.VSTS.Common.ValueArea'
'Microsoft.VSTS.Scheduling.TargetDate'
'Microsoft.VSTS.Scheduling.Effort'
'Microsoft.VSTS.Common.BacklogPriority'
'WEF_23998EC1A8D344D1A42AE8F4052B56F0_Kanban.Column'
'WEF_23998EC1A8D344D1A42AE8F4052B56F0_Kanban.Column.Done'
'WEF_23998EC1A8D344D1A42AE8F4052B56F0_Kanban.Lane'
'Custom.Analyst'
'Microsoft.VSTS.Common.AcceptanceCriteria'
'System.Tags'
'_links'
'url'