public/api-v2/project/Invoke-JiraGetProjectPermissionScheme.ps1
$JiraPermissionSchemeExpand = @("all","field","group","permissions","projectRole","user") #https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-rest-api-2-project-projectKeyOrId-permissionscheme-get function Invoke-JiraGetProjectPermissionScheme { [CmdletBinding()] param ( # The project Id or Key [Parameter(Mandatory,Position=0)] [string] $ProjectIdOrKey, # Used to expand additional attributes [Parameter(Position=1)] [ValidateScript({ Compare-StringArraySubset $JiraPermissionSchemeExpand $_ })] [string[]] $Expand, # The JiraConnection object to use for the request [Parameter(Position=2)] [hashtable] $JiraConnection ) process { $functionPath = "/rest/api/2/project/$ProjectIdOrKey/permissionscheme" $verb = "GET" $query = @{} if($PSBoundParameters.ContainsKey("Expand")){$query.Add("expand",$Expand -join ",")} Invoke-JiraRestMethod $JiraConnection $functionPath $verb -Query $query } } |