how to extract and plot the chat from azure devops chartimages api
As the log you get shows, the result of the REST API is in png
format. So, we need to perform simple processing on the obtained results and save the results in png
format:
The Rest API Chartimages - Get Iteration Chart Image:
GET https://dev.azure.com/{organization}/{project}/{team}/_apis/work/iterations/{iterationId}/chartimages/{name}?api-version=6.0-preview.1
I use the Burndown
as test chartimages name
.
Below is my test powershell scripts:
$outfile = "D:\TestFolder\Burndown.png"
$connectionToken="Your PAT Here"
$base64AuthInfo= [System.Convert]::ToBase64String([System.Text.Encoding]::
ASCII.GetBytes(":$($connectionToken)"))
$AuditLogURL = "https://dev.azure.com/{organization}/{project}/{team}/_apis/work/{iterationId}/chartimages/Burndown?api-version=6.0-preview.1"
$AuditInfo = Invoke-RestMethod -Uri $AuditLogURL -Headers @{authorization = "Basic $base64AuthInfo"} -Method Get –OutFile $outfile
The test result:
![enter image description here](https://i.stack.imgur.com/TSP6E.png)