public/api-v2/workflow/Invoke-JiraGetDefaultWorkflow.ps1
#https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-rest-api-2-workflowscheme-id-default-get function Invoke-JiraGetDefaultWorkflow { [CmdletBinding()] param ( # The id of the scheme to retrieve the default workflow for [Parameter(Mandatory,Position=0)] [int64] $SchemeId, # Set this flag to return the default workflow of the scheme's draft (instead of the published version) [Parameter()] [switch] $Draft, # The JiraContext object to use for the request [Parameter()] [object] $JiraContext ) process { $functionPath = "/rest/api/2/workflowscheme/$SchemeId/default" $verb = "GET" $query = New-PACRestMethodQueryParams if($PSBoundParameters.ContainsKey("Draft")){$query.Add("returnDraftIfExists",$true)} $method = New-PACRestMethod $functionPath $verb $query $method.Invoke($JiraContext) } } |