functions/generated/TestPlan/Get-AdsTestplanPlanSuite.ps1
function Get-AdsTestplanPlanSuite { <# .SYNOPSIS .DESCRIPTION Get test suites for plan. .PARAMETER ContinuationToken If the list of suites returned is not complete, a continuation token to query next batch of suites is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test suites. .PARAMETER Organization The name of the Azure DevOps organization. .PARAMETER Project Project ID or project name .PARAMETER SuiteId ID of the suite to get. .PARAMETER Expand Include the children suites and testers details. .PARAMETER AsTreeView If the suites returned should be in a tree structure. .PARAMETER PlanId ID of the test plan for which suites are requested. .PARAMETER ApiVersion Version of the API to use. This should be set to '7.1-preview.1' to use this version of the api. .EXAMPLE PS C:\> Get-AdsTestplanPlanSuite -Organization $organization -Project $project -SuiteId $suiteid -PlanId $planid -ApiVersion $apiversion Get test suite by suite id. .EXAMPLE PS C:\> Get-AdsTestplanPlanSuite -Organization $organization -Project $project -PlanId $planid -ApiVersion $apiversion Get test suites for plan. .LINK <unknown> #> [CmdletBinding(DefaultParameterSetName = 'default')] param ( [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $ContinuationToken, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')] [string] $Organization, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')] [string] $Project, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')] [string] $SuiteId, [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')] [string] $Expand, [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [boolean] $AsTreeView, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')] [string] $PlanId, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Test Suites_Get')] [string] $ApiVersion ) process { $__mapping = @{ 'ContinuationToken' = 'continuationToken' 'Expand' = 'expand' 'AsTreeView' = 'asTreeView' 'ApiVersion' = 'api-version' } $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ContinuationToken','Expand','AsTreeView','ApiVersion') -Mapping $__mapping $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping $__path = 'https://dev.azure.com/{organization}/{project}/_apis/testplan/Plans/{planId}/suites' -Replace '{organization}',$Organization -Replace '{project}',$Project -Replace '{planId}',$PlanId if ($SuiteId) { $__path += "/$SuiteId" } Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header } } |