functions/generated/WorkItemTracking/Set-AdsWitQuerie.ps1
function Set-AdsWitQuerie { <# .SYNOPSIS .DESCRIPTION Creates a query, or moves a query. Learn more about Work Item Query Language (WIQL) syntax [here](https://docs.microsoft.com/en-us/vsts/collaborate/wiql-syntax?toc=/vsts/work/track/toc.json&bc=/vsts/work/track/breadcrumb/toc.json&view=vsts). .PARAMETER Organization The name of the Azure DevOps organization. .PARAMETER ValidateWiqlOnly If you only want to validate your WIQL query without actually creating one, set it to true. Default is false. .PARAMETER Query The parent id or path under which the query is to be created. .PARAMETER Project Project ID or project name .PARAMETER ApiVersion Version of the API to use. This should be set to '7.1-preview.2' to use this version of the api. .EXAMPLE PS C:\> Set-AdsWitQuerie -Organization $organization -Query $query -Project $project -ApiVersion $apiversion Creates a query, or moves a query. Learn more about Work Item Query Language (WIQL) syntax [here](https://docs.microsoft.com/en-us/vsts/collaborate/wiql-syntax?toc=/vsts/work/track/toc.json&bc=/vsts/work/track/breadcrumb/toc.json&view=vsts). .LINK <unknown> #> [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '')] [CmdletBinding(DefaultParameterSetName = 'default')] param ( [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $Organization, [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [boolean] $ValidateWiqlOnly, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $Query, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $Project, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [string] $ApiVersion ) process { $__mapping = @{ 'ValidateWiqlOnly' = 'validateWiqlOnly' 'ApiVersion' = 'api-version' } $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('ValidateWiqlOnly','ApiVersion') -Mapping $__mapping $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/queries/{query}' -Replace '{organization}',$Organization -Replace '{query}',$Query -Replace '{project}',$Project Invoke-RestRequest -Path $__path -Method post -Body $__body -Query $__query -Header $__header } } |