functions/generated/WorkItemTracking/Get-AdsWitWorkitemtypeField.ps1
function Get-AdsWitWorkitemtypeField { <# .SYNOPSIS .DESCRIPTION Get a list of fields for a work item type with detailed references. .PARAMETER Type Work item type. .PARAMETER Expand Expand level for the API response. Properties: to include allowedvalues, default value, isRequired etc. as a part of response; None: to skip these properties. .PARAMETER Field .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.3' to use this version of the api. .EXAMPLE PS C:\> Get-AdsWitWorkitemtypeField -Type $type -Field $field -Project $project -Organization $organization -ApiVersion $apiversion Get a field for a work item type with detailed references. .EXAMPLE PS C:\> Get-AdsWitWorkitemtypeField -Type $type -Project $project -Organization $organization -ApiVersion $apiversion Get a list of fields for a work item type with detailed references. .LINK <unknown> #> [CmdletBinding(DefaultParameterSetName = 'default')] param ( [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Field_Get')] [string] $Type, [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Field_Get')] [string] $Expand, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Field_Get')] [string] $Field, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Field_Get')] [string] $Project, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Field_Get')] [string] $Organization, [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'default')] [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'Work Item Types Field_Get')] [string] $ApiVersion ) process { $__mapping = @{ 'Expand' = '$expand' 'ApiVersion' = 'api-version' } $__body = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping $__query = $PSBoundParameters | ConvertTo-Hashtable -Include @('Expand','ApiVersion') -Mapping $__mapping $__header = $PSBoundParameters | ConvertTo-Hashtable -Include @() -Mapping $__mapping $__path = 'https://dev.azure.com/{organization}/{project}/_apis/wit/workitemtypes/{type}/fields' -Replace '{type}',$Type -Replace '{project}',$Project -Replace '{organization}',$Organization if ($Field) { $__path += "/$Field" } Invoke-RestRequest -Path $__path -Method get -Body $__body -Query $__query -Header $__header } } |