getProjectVersionsPaginated method

Future<PageBeanVersion> getProjectVersionsPaginated({
  1. required String projectIdOrKey,
  2. int? startAt,
  3. int? maxResults,
  4. String? orderBy,
  5. String? query,
  6. String? status,
  7. String? expand,
})

Returns a paginated list of all versions in a project. See the Get project versions resource if you want to get a full list of versions without pagination.

This operation can be accessed anonymously.

Permissions required: Browse Projects project permission for the project.

Implementation

Future<PageBeanVersion> getProjectVersionsPaginated(
    {required String projectIdOrKey,
    int? startAt,
    int? maxResults,
    String? orderBy,
    String? query,
    String? status,
    String? expand}) async {
  return PageBeanVersion.fromJson(await _client.send(
    'get',
    'rest/api/3/project/{projectIdOrKey}/version',
    pathParameters: {
      'projectIdOrKey': projectIdOrKey,
    },
    queryParameters: {
      if (startAt != null) 'startAt': '$startAt',
      if (maxResults != null) 'maxResults': '$maxResults',
      if (orderBy != null) 'orderBy': orderBy,
      if (query != null) 'query': query,
      if (status != null) 'status': status,
      if (expand != null) 'expand': expand,
    },
  ));
}