MethodsAndPractices / vsteam

PowerShell module for accessing Azure DevOps Services and Azure DevOps Server (formerly VSTS or TFS)
https://methodsandpractices.github.io/vsteam-docs/
MIT License
447 stars 155 forks source link

Implement continuationToken management (body and headers) on v8.0.0 branch #509

Open mnieto opened 1 year ago

mnieto commented 1 year ago

PR Summary

Some endpoints in Azure DevOps APIs version 6.0 and above use continuationToken as part of the body response or X-MS-ContinuationToken header

In both cases it is possible provide this functionality adding the following parameters to the _callAPI function

IMPORTANT: Managing response headers in the Invoke-RestMethod cmdlet forces to use only poweshell core. This required functionality was introduced in powershell core v6 and it is not available in Desktop flavour.

With this changes it is not necessary to maintain a separated __callAPIContinuationToken function. As part of the PR I want to update the Get-VSTeamUser and Get-VSTeamUserEntitlement functions mentioned in the below issues.

This change enables the possibility to fix at least the below issues:

PR Checklist

mnieto commented 1 year ago

@SebastianSchuetze, perhaps it could be a good idea to announce, in addition to #458 the removal of support to Powershell Desktop in the v8.x version