azureazure-devopsdevopsazure-devops-rest-apibacklog

Is there a way to pickup backlog item data from the Azure DevOps API?


We are using the Azure DevOps API for many features in our web application built with C# (.NET CORE) and JavaScript (React).

We would like to make an API GET to pickup our backlog item data from our Azure DevOps repositories but are unable to find any documentation nor an explanation on how to achieve this.

We have tried the following two services but neither gave us the information we were wanting to pickup:

For clarification, it is the data of the backlog items that we are interested in. Not the backlog itself or the backlog work items. The image below demonstrates the backlog items we would like to pick up from the Azure DevOps service to load into our application:

Image

The below image is the information present when you click on one of these backlog items and it is this data that we specifically want to pick up and load into our application:

enter image description here

If anyone knows how to do this, please let us know.

Many thanks in advance!


Solution

  • As workaround, you can first get the work items' id through Backlogs-Get Backlog Level Work Items rest api, and then get the detailed data of the items through Work Items-Get Work Items Batch rest api.

    POST https://dev.azure.com/{organization}/{project}/_apis/wit/workitemsbatch?api-version=6.0
    

    Sample request body:

    {
      "ids": [
        297,
        299,
        300
      ],
      "fields": [
        "System.Id",
        "System.Title",
        "System.WorkItemType",
        "Microsoft.VSTS.Scheduling.RemainingWork"
      ]
    }