getWorkflow method

Future<IssueTypesWorkflowMapping> getWorkflow({
  1. required int id,
  2. String? workflowName,
  3. bool? returnDraftIfExists,
})

Returns the workflow-issue type mappings for a workflow scheme.

Permissions required: Administer Jira global permission.

Implementation

Future<IssueTypesWorkflowMapping> getWorkflow(
    {required int id,
    String? workflowName,
    bool? returnDraftIfExists}) async {
  return IssueTypesWorkflowMapping.fromJson(await _client.send(
    'get',
    'rest/api/3/workflowscheme/{id}/workflow',
    pathParameters: {
      'id': '$id',
    },
    queryParameters: {
      if (workflowName != null) 'workflowName': workflowName,
      if (returnDraftIfExists != null)
        'returnDraftIfExists': '$returnDraftIfExists',
    },
  ));
}