public/api-v2/permission-scheme/Invoke-JiraGetAllPermissionSchemes.ps1
$JiraPermissionSchemeExpand = @("all","field","group","permissions","projectRole","user") #https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-rest-api-2-permissionscheme-get function Invoke-JiraGetAllPermissionSchemes { [CmdletBinding()] param ( # Used to expand additional attributes [Parameter(Position=0)] [ValidateScript({ Compare-StringArraySubset $JiraPermissionSchemeExpand $_ })] [string[]] $Expand, # The JiraContext object to use for the request [Parameter()] [object] $JiraContext ) process { $functionPath = "/rest/api/2/permissionscheme" $verb = "GET" $query = New-PACRestMethodQueryParams if($PSBoundParameters.ContainsKey("Expand")){$query.Add("expand",$Expand -join ",")} $method = New-PACRestMethod $functionPath $verb $query $method.Invoke($JiraContext).permissionSchemes } } |