1
votes

Is there a way to get the capacity of the entire Team from Azure Devops using Rest API. The current List-Capacity API returns data for each member of the team . Is there any way to get the available capacity of the whole team instead of getting the capacity for each member. List-Capacity API : https://docs.microsoft.com/en-us/rest/api/azure/devops/work/capacities/get?view=azure-devops-rest-5.0

UPDATE: Feature Suggestion has been created in User Voice Forum to get the capacity of the entire team. Please vote for this suggestion if you're looking for this feature too: https://developercommunity.visualstudio.com/content/idea/1004466/api-to-get-the-total-capacity-of-the-team.html

2

2 Answers

0
votes

I do not think if there is an API method avaialble, however i came across this method,

/**
 * Get a team's capacity
 * 
 * @param teamContext - The team context for the operation
 * @param iterationId - ID of the iteration
 */
public async getCapacitiesWithIdentityRef(
    teamContext: TfsCore.TeamContext,
    iterationId: string
    ): Promise<Work.TeamMemberCapacityIdentityRef[]> {

    const project = teamContext.projectId || teamContext.project;
    const team = teamContext.teamId || teamContext.team;

    return this.beginRequest<Work.TeamMemberCapacityIdentityRef[]>({
        apiVersion: "5.2-preview.2",
        routeTemplate: "{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities/{teamMemberId}",
        routeValues: {
            project: project,
            team: team,
            iterationId: iterationId
        }
    });
}
0
votes

Rest API for getting TOTAL team Capacity from Azure Devops

Sorry for the inconvenience. As I know there is no such Rest API to get TOTAL team Capacity from Azure Devops. Normally, the functions the Rest API provide are corresponding to what we can do in Web Portal.

enter image description here

Since the Total Capacity is not supported in either Web Portal or Rest API, you could submit this request on our User Voice forum to send your feedback about our product. You can share the idea of the expected Total Capacity feature there and the Product Team would know that.