Reputation: 83
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://learn.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
Upvotes: 2
Views: 2129
Reputation: 28086
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.
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.
Upvotes: 0
Reputation: 222522
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
}
});
}
Upvotes: 1