getProjectRoleDetails method

Future<List<ProjectRoleDetails>> getProjectRoleDetails({
  1. required String projectIdOrKey,
  2. bool? currentMember,
  3. bool? excludeConnectAddons,
})

Returns all project roles and the details for each role. Note that the list of project roles is common to all projects.

This operation can be accessed anonymously.

Permissions required: Administer Jira global permission or Administer projects project permission for the project.

Implementation

Future<List<ProjectRoleDetails>> getProjectRoleDetails(
    {required String projectIdOrKey,
    bool? currentMember,
    bool? excludeConnectAddons}) async {
  return (await _client.send(
    'get',
    'rest/api/3/project/{projectIdOrKey}/roledetails',
    pathParameters: {
      'projectIdOrKey': projectIdOrKey,
    },
    queryParameters: {
      if (currentMember != null) 'currentMember': '$currentMember',
      if (excludeConnectAddons != null)
        'excludeConnectAddons': '$excludeConnectAddons',
    },
  ) as List<Object?>)
      .map((i) =>
          ProjectRoleDetails.fromJson(i as Map<String, Object?>? ?? const {}))
      .toList();
}