Forum Discussion
How to Retrieve Work item updates history
How to Retrieve Work item updates history for a specific field like remaining Work using Azure DevOps API
adding extra details in comment section
2 Replies
Try this:
- API Endpoint: Use the following endpoint to get the updates for a specific work item.
GET https://dev.azure.com/{organization}/{project}/_apis/wit/workItems/{workItemId}/updates?api-version=7.1
Replace {organization}, {project}, and {workItemId} with your specific values.
- Filtering Updates: The response will include a list of all updates made to the work item. You'll need to manually filter for changes to the "Remaining Work" field by iterating through the field property of each update.
- Example Response: Here's a simplified example of what the response might look like:
{ "updates": [ { "id": 1, "updatedBy": "email address removed for privacy reasons", "updatedDate": "2024-11-30T12:34:56Z", "fields": { "Microsoft.VSTS.Scheduling.RemainingWork": 120 } }, { "id": 2, "updatedBy": "email address removed for privacy reasons", "updatedDate": "2024-11-29T11:22:33Z", "fields": { "Microsoft.VSTS.Scheduling.RemainingWork": 150 } } ] }
- Filtering in API Call: Unfortunately, there isn't a direct way to filter the results in the API call to retrieve updates only for the "Remaining Work" field. You'll need to process the response in your application to extract the relevant updates.
- API Endpoint: Use the following endpoint to get the updates for a specific work item.
- chamidu_sumanasekaraCopper Contributor
I am using azure devOps work-item updates API to track the changes made to a work item fields over
the time. Specially, I want to retrieve the history of updates to the Remaining Work field.
the work item update history API the response includes the list of all updates made to the work item, and I need to manually filter for changes to the Remaining Work field by iteration through the field property of each update.
Is there a way to filter the results directly in the API call to retrieve updates only for Remaining work.