getSecurityLevels method

Future<PageBeanSecurityLevel> getSecurityLevels({
  1. String? startAt,
  2. String? maxResults,
  3. List<String>? id,
  4. List<String>? schemeId,
  5. bool? onlyDefault,
})

Returns a paginated list of issue security levels.

Only issue security levels in the context of classic projects are returned.

Filtering using IDs is inclusive: if you specify both security scheme IDs and level IDs, the result will include both specified issue security levels and all issue security levels from the specified schemes.

Permissions required: Administer Jira global permission.

Implementation

Future<PageBeanSecurityLevel> getSecurityLevels(
    {String? startAt,
    String? maxResults,
    List<String>? id,
    List<String>? schemeId,
    bool? onlyDefault}) async {
  return PageBeanSecurityLevel.fromJson(await _client.send(
    'get',
    'rest/api/3/issuesecurityschemes/level',
    queryParameters: {
      if (startAt != null) 'startAt': startAt,
      if (maxResults != null) 'maxResults': maxResults,
      if (id != null) 'id': id.map((e) => e).join(','),
      if (schemeId != null) 'schemeId': schemeId.map((e) => e).join(','),
      if (onlyDefault != null) 'onlyDefault': '$onlyDefault',
    },
  ));
}