<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>get azure devops iteration capacity &#8211; Sibeesh Passion</title>
	<atom:link href="https://www.sibeeshpassion.com/tag/get-azure-devops-iteration-capacity/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.sibeeshpassion.com</link>
	<description>My passion towards life</description>
	<lastBuildDate>Sun, 22 Aug 2021 10:54:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>/wp-content/uploads/2017/04/Sibeesh_Passion_Logo_Small.png</url>
	<title>get azure devops iteration capacity &#8211; Sibeesh Passion</title>
	<link>https://www.sibeeshpassion.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Get Azure DevOps Sprint Capacity Using API and PostMan</title>
		<link>https://www.sibeeshpassion.com/get-azure-devops-sprint-capacity-using-api-and-postman/</link>
					<comments>https://www.sibeeshpassion.com/get-azure-devops-sprint-capacity-using-api-and-postman/#disqus_thread</comments>
		
		<dc:creator><![CDATA[SibeeshVenu]]></dc:creator>
		<pubDate>Sun, 22 Aug 2021 10:54:32 +0000</pubDate>
				<category><![CDATA[Azure]]></category>
		<category><![CDATA[Azure DevOps]]></category>
		<category><![CDATA[azure devops analytics]]></category>
		<category><![CDATA[Azure DevOps APIs]]></category>
		<category><![CDATA[azure devops capacity]]></category>
		<category><![CDATA[get average sprint capacity azure devops]]></category>
		<category><![CDATA[get azure devops iteration capacity]]></category>
		<category><![CDATA[get sprint capacity azure devops programatically]]></category>
		<guid isPermaLink="false">https://sibeeshpassion.com/?p=14453</guid>

					<description><![CDATA[ I wanted to know my Sprint capacity programmatically as I need to find the average sprint capacity and the area where my team is spending time, whether it is Development or Testing, etc. Unfortunately, there is no option to see that in the Azure DevOps, but luckily there are APIs we can get this information.]]></description>
										<content:encoded><![CDATA[
<p>Obviously, you can do many things in <a rel="noreferrer noopener" href="https://sibeeshpassion.com/tag/azure-devops/" target="_blank">Azure DevOps</a>, but there may be some cases where you may need to do something special to get what you wanted. Here, I wanted to know my Sprint capacity programmatically as I need to find the average sprint capacity and the area where my team is spending time, whether it is Development or Testing, etc. Unfortunately, there is no option to see that in the Azure DevOps, but luckily there are APIs we can get this information. Here, in this post, we will see how we can get that, let&#8217;s get started. </p>



<h1 class="wp-block-heading">Get the PAT (Personal Access Token)</h1>



<p>To connect to our DevOps using an API, we should authenticate and to do that, we need to create a PAT aka Personal Access Token. Goto your Azure DevOps and click on the User Settings button, and then Personal access tokens.</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><a href="/wp-content/uploads/2021/08/image-2.png"><img fetchpriority="high" decoding="async" width="400" height="613" src="/wp-content/uploads/2021/08/image-2.png" alt="" class="wp-image-14456" srcset="/wp-content/uploads/2021/08/image-2.png 400w, /wp-content/uploads/2021/08/image-2-196x300.png 196w" sizes="(max-width: 400px) 100vw, 400px" /></a><figcaption>Personal access tokens</figcaption></figure></div>



<p>Click on the +New Token button and fill all the required fields in the next screen. Once it is done, click on Create button, this will generate a token for you. <em>Please remember that you need to copy this token before you leave the page or reload, as this is not saved anywhere</em>. </p>



<h1 class="wp-block-heading">Setup PostMan</h1>



<p>I usually create a collection in PostMan before I do any related calls. You can create a collection by clicking the + icon in the collection section. Once it is created, click on the Authorization tab and change the type to Basic Auth, past the token you copied from Azure DevOps in the password field. Please remember that you should leave the Username field blank. </p>



<div class="wp-block-image"><figure class="aligncenter size-full"><a href="/wp-content/uploads/2021/08/image-3.png"><img decoding="async" width="800" height="538" src="/wp-content/uploads/2021/08/image-3.png" alt="" class="wp-image-14457" srcset="/wp-content/uploads/2021/08/image-3.png 800w, /wp-content/uploads/2021/08/image-3-300x202.png 300w, /wp-content/uploads/2021/08/image-3-768x516.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><figcaption>Setup PostMan using Azure DevOps Token</figcaption></figure></div>



<h1 class="wp-block-heading">Call the Azure DevOps APIs</h1>



<p>As we have successfully set up our PostMan, now we are ready to execute the APIs. </p>



<h2 class="wp-block-heading">Get Iterations</h2>



<p>Create a GET request under the collection we have created using <a rel="noreferrer noopener" href="https://docs.microsoft.com/en-us/rest/api/azure/devops/work/iterations/list?view=azure-devops-rest-6.0&amp;WT.mc_id=AZ-MVP-5001828" target="_blank">this format</a> to get the Iterations as we will use this in our next API call. The example is given below. </p>



<pre class="wp-block-code"><code>GET https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/iterations?api-version=6.0</code></pre>



<p>The Organization name and project name can be easily found on the Azure DevOps home page or from the URL you access your DevOps, for example, if you access your DevOps by this URL &#8220;<code>https://dev.azure.com/sibeeshpassion/publicrepo</code>&#8220;, sibeeshpassion is your organization name and publicrepo is your project name.  </p>



<p>You can either use your team name or team id as the next parameter. If you want to use the Team id, the easy way to find it is to go to your team by accessing this URL &#8220;<code>https://dev.azure.com/{orgName}/{projectName}/_settings/teams</code>&#8220;, click on the Team you wish, and then click on either Notification or Dashboard.</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><a href="/wp-content/uploads/2021/08/image-5.png"><img decoding="async" width="850" height="703" src="/wp-content/uploads/2021/08/image-5.png" alt="" class="wp-image-14459" srcset="/wp-content/uploads/2021/08/image-5.png 850w, /wp-content/uploads/2021/08/image-5-300x248.png 300w, /wp-content/uploads/2021/08/image-5-768x635.png 768w" sizes="(max-width: 850px) 100vw, 850px" /></a><figcaption>Azure DevOps Teams</figcaption></figure></div>



<p>A new page will be opened and you can get the Team id from the URL of the new page. For example, &#8220;<code>https://dev.azure.com/{orgName}/{projectName}/_settings/notifications?teamId=989154f4f-32f6-4dab-b7f5-165457afsgd36f</code>&#8220;. One thing to note here is to set the Type as &#8220;Inherit auth from parent&#8221; under the Authorization tab.</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><a href="/wp-content/uploads/2021/08/image-4.png"><img decoding="async" width="750" height="784" src="/wp-content/uploads/2021/08/image-4.png" alt="" class="wp-image-14458" srcset="/wp-content/uploads/2021/08/image-4.png 750w, /wp-content/uploads/2021/08/image-4-287x300.png 287w" sizes="(max-width: 750px) 100vw, 750px" /></a><figcaption>Get API Authorization Type</figcaption></figure></div>



<p>Click on the Send button now, and you should see the result. You can visualize the data you get <a rel="noreferrer noopener" href="https://learning.postman.com/docs/sending-requests/visualizer/" target="_blank">by using the visualizer if you wish.</a> </p>



<h2 class="wp-block-heading">Get the capacity</h2>



<p>As we now have all the iteration details we can perform the API call to get the capacity of each sprint. Create another GET request, by <a href="https://docs.microsoft.com/en-us/rest/api/azure/devops/work/capacities/list?view=azure-devops-rest-6.0&amp;WT.mc_id=AZ-MVP-5001828" target="_blank" rel="noreferrer noopener">using this format</a> and set the Authorization Type as &#8220;Inherit auth from parent&#8221;. The sample API looks like below, </p>



<pre class="wp-block-code"><code>GET https://dev.azure.com/{organization}/{project}/{team}/_apis/work/teamsettings/iterations/{iterationId}/capacities?api-version=6.0</code></pre>



<p>Replace the {iterationId} from the result of the previous execution. When you click on the Send button, you should now get a JSON array with all the details as below.</p>



<script src="https://gist.github.com/SibeeshVenu/914a3b9853b9195219ce2993fe7ad815.js"></script>



<p>Please be noted that I have removed all the values from the result. With the result, you can loop through the array and find the analytics data that you are looking for. </p>



<div class="wp-block-image"><figure class="aligncenter size-full"><a href="/wp-content/uploads/2021/08/image-6.png"><img decoding="async" width="800" height="465" src="/wp-content/uploads/2021/08/image-6.png" alt="" class="wp-image-14460" srcset="/wp-content/uploads/2021/08/image-6.png 800w, /wp-content/uploads/2021/08/image-6-300x174.png 300w, /wp-content/uploads/2021/08/image-6-768x446.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><figcaption>Get Capacities API Result</figcaption></figure></div>



<p>I am planning to create one front end application to do this, thus keep an eye here. You can also get the capacity of the team member by <a rel="noreferrer noopener" href="https://docs.microsoft.com/en-us/rest/api/azure/devops/work/capacities/get?view=azure-devops-rest-6.0&amp;WT.mc_id=AZ-MVP-5001828" target="_blank">executing this API</a>. </p>



<h1 class="wp-block-heading">Conclusion</h1>



<p>Thanks for reading this post, and here we learned,</p>



<ol class="wp-block-list"><li>How to get a personal access token from Azure DevOps?</li><li>How to authnticate the Azure DevOps APIs using the Personal Access Tokens and use the same in PostMan?</li><li>How to get the Team Iterations and Sprint Capacities of a Team in Azure DevOps?</li></ol>



<h1 class="wp-block-heading">About the Author</h1>



<p>I am yet another developer who is passionate about writing and video creation. I have written close to 500 blogs on my&nbsp;<a href="https://sibeeshpassion.com/" target="_blank" rel="noreferrer noopener">blog</a>. And I upload videos on my YouTube channels&nbsp;<a href="https://www.youtube.com/njanorumalayali" target="_blank" rel="noreferrer noopener">Njan Oru Malayali</a>&nbsp;and&nbsp;<a href="https://www.youtube.com/SibeeshPassion" target="_blank" rel="noreferrer noopener">Sibeesh Passion</a>. Please feel free to follow me.</p>



<ul class="wp-block-list"><li><a href="https://github.com/SibeeshVenu">GitHub</a></li><li><a href="https://medium.com/@sibeeshvenu">medium</a></li><li><a href="https://twitter.com/sibeeshvenu">Twitter</a></li></ul>



<h1 class="wp-block-heading">Your turn. What do you think?</h1>



<p>Thanks a lot for reading. Did I miss anything that you may think is needed in this article? Could you find this post useful? Kindly do not forget to share your feedback.</p>



<p>Kindest Regards</p>



<p>Sibeesh Venu</p>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.sibeeshpassion.com/get-azure-devops-sprint-capacity-using-api-and-postman/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
