I am trying to download the files related to ADO changeset into a folder.
By using below API I am able to retrieve the changeset:
GET https://dev.azure.com/{organization}/{project}/_apis/tfvc/changesets/{id}?api-version=5.1
I am writing a PS script something like this to download the files
$user = "XXXX"
$pass = "YYYYY"
$pair = "$($user):$($pass)"
$encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
$basicAuthValue = "Basic $encodedCreds"
$Headers = @{
Authorization = $basicAuthValue
}
Invoke-WebRequest -Uri GET https://dev.azure.com/{organization}/{project}/_apis/tfvc/changesets/{id}?api-version=5.1 -Headers $Headers
By using the above script I am able to retrieve the changes associated with changeset but how to download the files related to that changeset into a folder.