searchProjects method

Future<PageBeanProject> searchProjects({
  1. int? startAt,
  2. int? maxResults,
  3. String? orderBy,
  4. List<int>? id,
  5. List<String>? keys,
  6. String? query,
  7. String? typeKey,
  8. int? categoryId,
  9. String? action,
  10. String? expand,
  11. List<String>? status,
  12. List<StringList>? properties,
  13. String? propertyQuery,
})

Returns a paginated list of projects visible to the user.

This operation can be accessed anonymously.

Permissions required: Projects are returned only where the user has one of:

Implementation

Future<PageBeanProject> searchProjects(
    {int? startAt,
    int? maxResults,
    String? orderBy,
    List<int>? id,
    List<String>? keys,
    String? query,
    String? typeKey,
    int? categoryId,
    String? action,
    String? expand,
    List<String>? status,
    List<StringList>? properties,
    String? propertyQuery}) async {
  return PageBeanProject.fromJson(await _client.send(
    'get',
    'rest/api/3/project/search',
    queryParameters: {
      if (startAt != null) 'startAt': '$startAt',
      if (maxResults != null) 'maxResults': '$maxResults',
      if (orderBy != null) 'orderBy': orderBy,
      if (id != null) 'id': id.map((e) => '$e').join(','),
      if (keys != null) 'keys': keys.map((e) => e).join(','),
      if (query != null) 'query': query,
      if (typeKey != null) 'typeKey': typeKey,
      if (categoryId != null) 'categoryId': '$categoryId',
      if (action != null) 'action': action,
      if (expand != null) 'expand': expand,
      if (status != null) 'status': status.map((e) => e).join(','),
      if (properties != null)
        'properties': properties.map((e) => '$e').join(','),
      if (propertyQuery != null) 'propertyQuery': propertyQuery,
    },
  ));
}