functions/generated/WorkItemTracking/Set-AdsWitWiql.ps1
function Set-AdsWitWiql { <# .SYNOPSIS .DESCRIPTION Gets the results of the query given its WIQL. .PARAMETER Top The max number of results to return. .PARAMETER TimePrecision Whether or not to use time precision. .PARAMETER Project Project ID or project name .PARAMETER Organization The name of the Azure DevOps organization. .PARAMETER ApiVersion Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api. .PARAMETER Team Team ID or team name .EXAMPLE PS C:\> Set-AdsWitWiql -Project $project -Organization $organization -ApiVersion $apiversion -Team $team Gets the results of the query given its WIQL. .LINK <unknown> #> [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')] [CmdletBinding(DefaultParameterSetName = 'default')] param ( [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [int32] $Top, [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [boolean] $TimePrecision, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $Project, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $Organization, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $ApiVersion, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $Team ) process { $__mapping = @{ 'Top' = '$top' 'TimePrecision' = 'timePrecision' 'ApiVersion' = 'api-version' } $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Top','TimePrecision','ApiVersion') -Mapping $__mapping $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping $__path = 'https://dev.azure.com/{organization}/{project}/{team}/_apis/wit/wiql' -Replace '{project}',$Project -Replace '{organization}',$Organization -Replace '{team}',$Team Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header } } |